From cee56365f1f2a589dde0eb0b602f1db1c912da9f Mon Sep 17 00:00:00 2001 From: Yuming Wang Date: Wed, 29 May 2019 13:48:23 +0800 Subject: [PATCH] Merge master --- dev/run-tests.py | 9 +- dev/sparktestsupport/modules.py | 11 - .../SparkExecuteStatementOperation.scala | 3 +- .../SparkGetTablesOperation.scala | 8 +- .../hive/thriftserver/SparkSQLCLIDriver.scala | 5 +- .../thriftserver/SparkSQLCLIService.scala | 8 +- .../thriftserver/SparkSQLSessionManager.scala | 3 +- .../HiveThriftServer2Suites.scala | 21 +- .../SparkExecuteStatementOperationSuite.scala | 8 +- .../SparkMetadataOperationSuite.scala | 26 +- .../thriftserver/ThriftserverShimUtils.scala | 46 + .../v2.3.5/if/TCLIService.thrift | 138 +- .../cli/thrift/TCLIServiceConstants.java | 103 - .../{cli => rpc}/thrift/TArrayTypeEntry.java | 28 +- .../{cli => rpc}/thrift/TBinaryColumn.java | 68 +- .../{cli => rpc}/thrift/TBoolColumn.java | 64 +- .../{cli => rpc}/thrift/TBoolValue.java | 30 +- .../{cli => rpc}/thrift/TByteColumn.java | 64 +- .../{cli => rpc}/thrift/TByteValue.java | 30 +- .../{cli => rpc}/thrift/TCLIService.java | 5140 +++++++++++++---- .../rpc/thrift/TCLIServiceConstants.java | 106 + .../thrift/TCancelDelegationTokenReq.java | 34 +- .../thrift/TCancelDelegationTokenResp.java | 26 +- .../thrift/TCancelOperationReq.java | 26 +- .../thrift/TCancelOperationResp.java | 26 +- .../thrift/TCloseOperationReq.java | 26 +- .../thrift/TCloseOperationResp.java | 26 +- .../{cli => rpc}/thrift/TCloseSessionReq.java | 26 +- .../thrift/TCloseSessionResp.java | 26 +- .../service/{cli => rpc}/thrift/TColumn.java | 22 +- .../{cli => rpc}/thrift/TColumnDesc.java | 54 +- .../{cli => rpc}/thrift/TColumnValue.java | 22 +- .../{cli => rpc}/thrift/TDoubleColumn.java | 64 +- .../{cli => rpc}/thrift/TDoubleValue.java | 30 +- .../thrift/TExecuteStatementReq.java | 198 +- .../thrift/TExecuteStatementResp.java | 36 +- .../thrift/TFetchOrientation.java | 4 +- .../{cli => rpc}/thrift/TFetchResultsReq.java | 64 +- .../thrift/TFetchResultsResp.java | 46 +- .../{cli => rpc}/thrift/TGetCatalogsReq.java | 26 +- .../{cli => rpc}/thrift/TGetCatalogsResp.java | 36 +- .../{cli => rpc}/thrift/TGetColumnsReq.java | 60 +- .../{cli => rpc}/thrift/TGetColumnsResp.java | 36 +- .../rpc/thrift/TGetCrossReferenceReq.java | 1034 ++++ .../rpc/thrift/TGetCrossReferenceResp.java | 509 ++ .../thrift/TGetDelegationTokenReq.java | 42 +- .../thrift/TGetDelegationTokenResp.java | 36 +- .../{cli => rpc}/thrift/TGetFunctionsReq.java | 52 +- .../thrift/TGetFunctionsResp.java | 36 +- .../{cli => rpc}/thrift/TGetInfoReq.java | 38 +- .../{cli => rpc}/thrift/TGetInfoResp.java | 34 +- .../{cli => rpc}/thrift/TGetInfoType.java | 4 +- .../{cli => rpc}/thrift/TGetInfoValue.java | 22 +- .../thrift/TGetOperationStatusReq.java | 135 +- .../thrift/TGetOperationStatusResp.java | 585 +- .../rpc/thrift/TGetPrimaryKeysReq.java | 716 +++ .../rpc/thrift/TGetPrimaryKeysResp.java | 509 ++ .../thrift/TGetResultSetMetadataReq.java | 26 +- .../thrift/TGetResultSetMetadataResp.java | 36 +- .../{cli => rpc}/thrift/TGetSchemasReq.java | 44 +- .../{cli => rpc}/thrift/TGetSchemasResp.java | 36 +- .../thrift/TGetTableTypesReq.java | 26 +- .../thrift/TGetTableTypesResp.java | 36 +- .../{cli => rpc}/thrift/TGetTablesReq.java | 81 +- .../{cli => rpc}/thrift/TGetTablesResp.java | 36 +- .../{cli => rpc}/thrift/TGetTypeInfoReq.java | 26 +- .../{cli => rpc}/thrift/TGetTypeInfoResp.java | 36 +- .../thrift/THandleIdentifier.java | 52 +- .../{cli => rpc}/thrift/TI16Column.java | 64 +- .../{cli => rpc}/thrift/TI16Value.java | 30 +- .../{cli => rpc}/thrift/TI32Column.java | 64 +- .../{cli => rpc}/thrift/TI32Value.java | 30 +- .../{cli => rpc}/thrift/TI64Column.java | 64 +- .../{cli => rpc}/thrift/TI64Value.java | 30 +- .../rpc/thrift/TJobExecutionStatus.java | 48 + .../{cli => rpc}/thrift/TMapTypeEntry.java | 38 +- .../{cli => rpc}/thrift/TOpenSessionReq.java | 97 +- .../{cli => rpc}/thrift/TOpenSessionResp.java | 97 +- .../{cli => rpc}/thrift/TOperationHandle.java | 60 +- .../{cli => rpc}/thrift/TOperationState.java | 9 +- .../{cli => rpc}/thrift/TOperationType.java | 4 +- .../thrift/TPrimitiveTypeEntry.java | 40 +- .../rpc/thrift/TProgressUpdateResp.java | 1033 ++++ .../{cli => rpc}/thrift/TProtocolVersion.java | 12 +- .../thrift/TRenewDelegationTokenReq.java | 34 +- .../thrift/TRenewDelegationTokenResp.java | 26 +- .../service/{cli => rpc}/thrift/TRow.java | 48 +- .../service/{cli => rpc}/thrift/TRowSet.java | 310 +- .../{cli => rpc}/thrift/TSessionHandle.java | 26 +- .../service/{cli => rpc}/thrift/TStatus.java | 87 +- .../{cli => rpc}/thrift/TStatusCode.java | 4 +- .../{cli => rpc}/thrift/TStringColumn.java | 64 +- .../{cli => rpc}/thrift/TStringValue.java | 28 +- .../{cli => rpc}/thrift/TStructTypeEntry.java | 52 +- .../{cli => rpc}/thrift/TTableSchema.java | 48 +- .../{cli => rpc}/thrift/TTypeDesc.java | 48 +- .../{cli => rpc}/thrift/TTypeEntry.java | 22 +- .../service/{cli => rpc}/thrift/TTypeId.java | 4 +- .../thrift/TTypeQualifierValue.java | 22 +- .../{cli => rpc}/thrift/TTypeQualifiers.java | 56 +- .../{cli => rpc}/thrift/TUnionTypeEntry.java | 52 +- .../thrift/TUserDefinedTypeEntry.java | 26 +- .../apache/hive/service/AbstractService.java | 6 +- .../apache/hive/service/CompositeService.java | 6 +- .../org/apache/hive/service/CookieSigner.java | 12 +- .../hive/service/ServiceOperations.java | 6 +- .../org/apache/hive/service/ServiceUtils.java | 26 + .../hive/service/auth/HiveAuthFactory.java | 44 +- .../hive/service/auth/HttpAuthUtils.java | 6 +- .../hive/service/auth/KerberosSaslHelper.java | 4 +- .../hive/service/auth/PlainSaslHelper.java | 2 +- .../service/auth/TSetIpAddressProcessor.java | 4 +- .../apache/hive/service/cli/CLIService.java | 92 +- .../org/apache/hive/service/cli/Column.java | 423 -- .../hive/service/cli/ColumnBasedSet.java | 101 +- .../hive/service/cli/ColumnDescriptor.java | 11 +- .../apache/hive/service/cli/ColumnValue.java | 30 +- .../service/cli/EmbeddedCLIServiceClient.java | 208 - .../hive/service/cli/FetchOrientation.java | 2 +- .../apache/hive/service/cli/GetInfoType.java | 2 +- .../apache/hive/service/cli/GetInfoValue.java | 2 +- .../org/apache/hive/service/cli/Handle.java | 2 +- .../hive/service/cli/HandleIdentifier.java | 2 +- .../hive/service/cli/HiveSQLException.java | 4 +- .../apache/hive/service/cli/ICLIService.java | 18 +- .../hive/service/cli/OperationHandle.java | 4 +- .../hive/service/cli/OperationState.java | 9 +- .../hive/service/cli/OperationType.java | 2 +- .../apache/hive/service/cli/RowBasedSet.java | 20 +- .../org/apache/hive/service/cli/RowSet.java | 2 +- .../hive/service/cli/RowSetFactory.java | 13 +- .../hive/service/cli/SessionHandle.java | 9 +- .../apache/hive/service/cli/TableSchema.java | 14 +- .../org/apache/hive/service/cli/Type.java | 349 -- .../hive/service/cli/TypeDescriptor.java | 7 +- .../hive/service/cli/TypeQualifiers.java | 6 +- .../operation/ClassicTableTypeMapping.java | 52 +- .../operation/ExecuteStatementOperation.java | 24 +- .../cli/operation/GetCatalogsOperation.java | 2 +- .../cli/operation/GetColumnsOperation.java | 29 +- .../operation/GetCrossReferenceOperation.java | 161 + .../cli/operation/GetFunctionsOperation.java | 4 +- .../operation/GetPrimaryKeysOperation.java | 115 + .../cli/operation/GetSchemasOperation.java | 2 +- .../cli/operation/GetTableTypesOperation.java | 2 +- .../cli/operation/GetTablesOperation.java | 46 +- .../cli/operation/GetTypeInfoOperation.java | 4 +- .../cli/operation/HiveCommandOperation.java | 14 +- .../cli/operation/HiveTableTypeMapping.java | 6 +- .../cli/operation/MetadataOperation.java | 2 +- .../hive/service/cli/operation/Operation.java | 32 +- .../cli/operation/OperationManager.java | 39 +- .../service/cli/operation/SQLOperation.java | 25 +- .../cli/operation/TableTypeMapping.java | 6 +- .../hive/service/cli/session/HiveSession.java | 52 +- .../service/cli/session/HiveSessionBase.java | 2 +- .../HiveSessionHookContext.java} | 43 +- .../session/HiveSessionHookContextImpl.java | 52 + .../service/cli/session/HiveSessionImpl.java | 109 +- .../cli/session/HiveSessionImplwithUGI.java | 10 +- .../service/cli/session/SessionManager.java | 8 +- .../cli/thrift/ThriftBinaryCLIService.java | 9 +- .../service/cli/thrift/ThriftCLIService.java | 47 +- .../cli/thrift/ThriftCLIServiceClient.java | 69 +- .../cli/thrift/ThriftHttpCLIService.java | 9 +- .../service/cli/thrift/ThriftHttpServlet.java | 33 +- .../hive/service/server/HiveServer2.java | 17 +- .../server/ThreadWithGarbageCleanup.java | 6 +- .../thriftserver/ThriftserverShimUtils.scala | 46 + 169 files changed, 11990 insertions(+), 4232 deletions(-) create mode 100644 sql/hive-thriftserver/v1.2.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala delete mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TArrayTypeEntry.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TBinaryColumn.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TBoolColumn.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TBoolValue.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TByteColumn.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TByteValue.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCLIService.java (80%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCancelDelegationTokenReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCancelDelegationTokenResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCancelOperationReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCancelOperationResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCloseOperationReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCloseOperationResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCloseSessionReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TCloseSessionResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TColumn.java (97%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TColumnDesc.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TColumnValue.java (97%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TDoubleColumn.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TDoubleValue.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TExecuteStatementReq.java (81%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TExecuteStatementResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TFetchOrientation.java (92%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TFetchResultsReq.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TFetchResultsResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetCatalogsReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetCatalogsResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetColumnsReq.java (95%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetColumnsResp.java (94%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetDelegationTokenReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetDelegationTokenResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetFunctionsReq.java (95%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetFunctionsResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetInfoReq.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetInfoResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetInfoType.java (98%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetInfoValue.java (96%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetOperationStatusReq.java (69%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetOperationStatusResp.java (54%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetResultSetMetadataReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetResultSetMetadataResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetSchemasReq.java (95%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetSchemasResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTableTypesReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTableTypesResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTablesReq.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTablesResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTypeInfoReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TGetTypeInfoResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/THandleIdentifier.java (91%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI16Column.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI16Value.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI32Column.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI32Value.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI64Column.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TI64Value.java (93%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TMapTypeEntry.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TOpenSessionReq.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TOpenSessionResp.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TOperationHandle.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TOperationState.java (87%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TOperationType.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TPrimitiveTypeEntry.java (93%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TProtocolVersion.java (82%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TRenewDelegationTokenReq.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TRenewDelegationTokenResp.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TRow.java (91%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TRowSet.java (66%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TSessionHandle.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TStatus.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TStatusCode.java (92%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TStringColumn.java (90%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TStringValue.java (93%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TStructTypeEntry.java (92%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTableSchema.java (91%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTypeDesc.java (91%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTypeEntry.java (97%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTypeId.java (95%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTypeQualifierValue.java (94%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TTypeQualifiers.java (91%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TUnionTypeEntry.java (92%) rename sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/{cli => rpc}/thrift/TUserDefinedTypeEntry.java (94%) delete mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Column.java delete mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java delete mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Type.java create mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java create mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java rename sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/{PatternOrIdentifier.java => session/HiveSessionHookContext.java} (58%) create mode 100644 sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java create mode 100644 sql/hive-thriftserver/v2.3.5/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala diff --git a/dev/run-tests.py b/dev/run-tests.py index 592fbee823eea..5211aea03ea49 100755 --- a/dev/run-tests.py +++ b/dev/run-tests.py @@ -112,7 +112,6 @@ def determine_modules_to_test(changed_modules): ['graphx', 'examples'] >>> x = [x.name for x in determine_modules_to_test([modules.sql])] >>> x # doctest: +NORMALIZE_WHITESPACE - ... # doctest: +SKIP ['sql', 'avro', 'hive', 'mllib', 'sql-kafka-0-10', 'examples', 'hive-thriftserver', 'pyspark-sql', 'repl', 'sparkr', 'pyspark-mllib', 'pyspark-ml'] """ @@ -123,15 +122,9 @@ def determine_modules_to_test(changed_modules): # If we need to run all of the tests, then we should short-circuit and return 'root' if modules.root in modules_to_test: return [modules.root] - changed_modules = toposort_flatten( + return toposort_flatten( {m: set(m.dependencies).intersection(modules_to_test) for m in modules_to_test}, sort=True) - # TODO: Skip hive-thriftserver module for hadoop-3.2. remove this once hadoop-3.2 support it - if modules.hadoop_version == "hadoop3.2": - changed_modules = [m for m in changed_modules if m.name != "hive-thriftserver"] - - return changed_modules - def determine_tags_to_exclude(changed_modules): tags = [] diff --git a/dev/sparktestsupport/modules.py b/dev/sparktestsupport/modules.py index 7fe3b1be75d93..d496eecd4d703 100644 --- a/dev/sparktestsupport/modules.py +++ b/dev/sparktestsupport/modules.py @@ -15,11 +15,9 @@ # limitations under the License. # -from __future__ import print_function from functools import total_ordering import itertools import re -import os all_modules = [] @@ -558,15 +556,6 @@ def __hash__(self): ] ) -# TODO: Skip hive-thriftserver module for hadoop-3.2. remove this once hadoop-3.2 support it -if os.environ.get("AMPLAB_JENKINS"): - hadoop_version = os.environ.get("AMPLAB_JENKINS_BUILD_PROFILE", "hadoop2.7") -else: - hadoop_version = os.environ.get("HADOOP_PROFILE", "hadoop2.7") -if hadoop_version == "hadoop3.2": - print("[info] Skip unsupported module:", "hive-thriftserver") - all_modules = [m for m in all_modules if m.name != "hive-thriftserver"] - # The root module is a dummy module which is used to run all of the tests. # No other modules should directly depend on this module. root = Module( diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala index 3862d6c129d89..820f76db6db3b 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala @@ -113,7 +113,8 @@ private[hive] class SparkExecuteStatementOperation( validateDefaultFetchOrientation(order) assertState(OperationState.FINISHED) setHasResultSet(true) - val resultRowSet: RowSet = RowSetFactory.create(getResultSetSchema, getProtocolVersion) + val resultRowSet: RowSet = + ThriftserverShimUtils.resultRowSet(getResultSetSchema, getProtocolVersion) // Reset iter to header when fetching start from first row if (order.equals(FetchOrientation.FETCH_FIRST)) { diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTablesOperation.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTablesOperation.scala index 369650047b103..e0b610423cce5 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTablesOperation.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTablesOperation.scala @@ -30,6 +30,7 @@ import org.apache.hive.service.cli.session.HiveSession import org.apache.spark.sql.SQLContext import org.apache.spark.sql.catalyst.catalog.CatalogTableType import org.apache.spark.sql.catalyst.catalog.CatalogTableType._ +import org.apache.spark.sql.hive.HiveUtils /** * Spark's own GetTablesOperation @@ -83,7 +84,12 @@ private[hive] class SparkGetTablesOperation( catalogTable.identifier.table, tableType, catalogTable.comment.getOrElse("")) - rowSet.addRow(rowData) + // Since HIVE-7575(Hive 2.0.0), adds 5 additional columns to the ResultSet of GetTables. + if (HiveUtils.isHive23) { + rowSet.addRow(rowData ++ Array(null, null, null, null, null)) + } else { + rowSet.addRow(rowData) + } } } } diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala index 327dca7de293d..055822040ca43 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala @@ -26,7 +26,6 @@ import scala.collection.JavaConverters._ import jline.console.ConsoleReader import jline.console.history.FileHistory import org.apache.commons.lang3.StringUtils -import org.apache.commons.logging.LogFactory import org.apache.hadoop.conf.Configuration import org.apache.hadoop.hive.cli.{CliDriver, CliSessionState, OptionsProcessor} import org.apache.hadoop.hive.common.HiveInterruptUtils @@ -297,9 +296,7 @@ private[hive] object SparkSQLCLIDriver extends Logging { private[hive] class SparkSQLCLIDriver extends CliDriver with Logging { private val sessionState = SessionState.get().asInstanceOf[CliSessionState] - private val LOG = LogFactory.getLog(classOf[SparkSQLCLIDriver]) - - private val console = new SessionState.LogHelper(LOG) + private val console = ThriftserverShimUtils.getConsole private val isRemoteMode = { SparkSQLCLIDriver.isRemoteMode(sessionState) diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala index 1335e16e35882..c32d908ad1bba 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala @@ -33,8 +33,10 @@ import org.apache.hive.service.Service.STATE import org.apache.hive.service.auth.HiveAuthFactory import org.apache.hive.service.cli._ import org.apache.hive.service.server.HiveServer2 +import org.slf4j.Logger import org.apache.spark.sql.SQLContext +import org.apache.spark.sql.hive.HiveUtils import org.apache.spark.sql.hive.thriftserver.ReflectionUtils._ private[hive] class SparkSQLCLIService(hiveServer: HiveServer2, sqlContext: SQLContext) @@ -112,6 +114,10 @@ private[thriftserver] trait ReflectedCompositeService { this: AbstractService => invoke(classOf[AbstractService], this, "ensureCurrentState", classOf[STATE] -> STATE.NOTINITED) setAncestorField(this, 3, "hiveConf", hiveConf) invoke(classOf[AbstractService], this, "changeState", classOf[STATE] -> STATE.INITED) - getAncestorField[Log](this, 3, "LOG").info(s"Service: $getName is inited.") + if (HiveUtils.isHive23) { + getAncestorField[Logger](this, 3, "LOG").info(s"Service: $getName is inited.") + } else { + getAncestorField[Log](this, 3, "LOG").info(s"Service: $getName is inited.") + } } } diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala index 2958b771f3648..13055e0ae1394 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala @@ -24,7 +24,6 @@ import org.apache.hadoop.hive.conf.HiveConf import org.apache.hadoop.hive.conf.HiveConf.ConfVars import org.apache.hive.service.cli.SessionHandle import org.apache.hive.service.cli.session.SessionManager -import org.apache.hive.service.cli.thrift.TProtocolVersion import org.apache.hive.service.server.HiveServer2 import org.apache.spark.sql.SQLContext @@ -45,7 +44,7 @@ private[hive] class SparkSQLSessionManager(hiveServer: HiveServer2, sqlContext: } override def openSession( - protocol: TProtocolVersion, + protocol: ThriftserverShimUtils.TProtocolVersion, username: String, passwd: String, ipAddress: String, diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala index ee1f91a71f6b0..d4abf6886eea7 100644 --- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala +++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala @@ -35,7 +35,6 @@ import org.apache.hadoop.hive.conf.HiveConf.ConfVars import org.apache.hive.jdbc.HiveDriver import org.apache.hive.service.auth.PlainSaslHelper import org.apache.hive.service.cli.{FetchOrientation, FetchType, GetInfoType} -import org.apache.hive.service.cli.thrift.TCLIService.Client import org.apache.hive.service.cli.thrift.ThriftCLIServiceClient import org.apache.thrift.protocol.TBinaryProtocol import org.apache.thrift.transport.TSocket @@ -66,7 +65,7 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { val user = System.getProperty("user.name") val transport = PlainSaslHelper.getPlainTransport(user, "anonymous", rawTransport) val protocol = new TBinaryProtocol(transport) - val client = new ThriftCLIServiceClient(new Client(protocol)) + val client = new ThriftCLIServiceClient(new ThriftserverShimUtils.Client(protocol)) transport.open() try f(client) finally transport.close() @@ -536,7 +535,11 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { conf += resultSet.getString(1) -> resultSet.getString(2) } - assert(conf.get("spark.sql.hive.version") === Some("1.2.1")) + if (HiveUtils.isHive23) { + assert(conf.get("spark.sql.hive.version") === Some("2.3.5")) + } else { + assert(conf.get("spark.sql.hive.version") === Some("1.2.1")) + } } } @@ -549,7 +552,11 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { conf += resultSet.getString(1) -> resultSet.getString(2) } - assert(conf.get("spark.sql.hive.version") === Some("1.2.1")) + if (HiveUtils.isHive23) { + assert(conf.get("spark.sql.hive.version") === Some("2.3.5")) + } else { + assert(conf.get("spark.sql.hive.version") === Some("1.2.1")) + } } } @@ -627,7 +634,11 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { val sessionHandle = client.openSession(user, "") val sessionID = sessionHandle.getSessionId - assert(pipeoutFileList(sessionID).length == 1) + if (HiveUtils.isHive23) { + assert(pipeoutFileList(sessionID).length == 2) + } else { + assert(pipeoutFileList(sessionID).length == 1) + } client.closeSession(sessionHandle) diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperationSuite.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperationSuite.scala index 06e3980662048..13df3fabc4919 100644 --- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperationSuite.scala +++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperationSuite.scala @@ -27,8 +27,8 @@ class SparkExecuteStatementOperationSuite extends SparkFunSuite { val tableSchema = StructType(Seq(field1, field2)) val columns = SparkExecuteStatementOperation.getTableSchema(tableSchema).getColumnDescriptors() assert(columns.size() == 2) - assert(columns.get(0).getType() == org.apache.hive.service.cli.Type.NULL_TYPE) - assert(columns.get(1).getType() == org.apache.hive.service.cli.Type.NULL_TYPE) + assert(columns.get(0).getType().getName == "VOID") + assert(columns.get(1).getType().getName == "VOID") } test("SPARK-20146 Comment should be preserved") { @@ -37,9 +37,9 @@ class SparkExecuteStatementOperationSuite extends SparkFunSuite { val tableSchema = StructType(Seq(field1, field2)) val columns = SparkExecuteStatementOperation.getTableSchema(tableSchema).getColumnDescriptors() assert(columns.size() == 2) - assert(columns.get(0).getType() == org.apache.hive.service.cli.Type.STRING_TYPE) + assert(columns.get(0).getType().getName == "STRING") assert(columns.get(0).getComment() == "comment 1") - assert(columns.get(1).getType() == org.apache.hive.service.cli.Type.INT_TYPE) + assert(columns.get(1).getType().getName == "INT") assert(columns.get(1).getComment() == "") } } diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala index bf9982388d6b7..6f0e2e3eff72b 100644 --- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala +++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala @@ -19,9 +19,8 @@ package org.apache.spark.sql.hive.thriftserver import java.util.{Arrays => JArrays, List => JList, Properties} -import org.apache.hive.jdbc.{HiveConnection, HiveQueryResultSet, Utils => JdbcUtils} +import org.apache.hive.jdbc.{HiveConnection, HiveQueryResultSet} import org.apache.hive.service.auth.PlainSaslHelper -import org.apache.hive.service.cli.thrift._ import org.apache.thrift.protocol.TBinaryProtocol import org.apache.thrift.transport.TSocket @@ -37,13 +36,13 @@ class SparkMetadataOperationSuite extends HiveThriftJdbcTest { val connection = new HiveConnection(s"jdbc:hive2://localhost:$serverPort", new Properties) val user = System.getProperty("user.name") val transport = PlainSaslHelper.getPlainTransport(user, "anonymous", rawTransport) - val client = new TCLIService.Client(new TBinaryProtocol(transport)) + val client = new ThriftserverShimUtils.Client(new TBinaryProtocol(transport)) transport.open() var rs: HiveQueryResultSet = null try { - val openResp = client.OpenSession(new TOpenSessionReq) + val openResp = client.OpenSession(new ThriftserverShimUtils.TOpenSessionReq) val sessHandle = openResp.getSessionHandle - val schemaReq = new TGetSchemasReq(sessHandle) + val schemaReq = new ThriftserverShimUtils.TGetSchemasReq(sessHandle) if (catalog != null) { schemaReq.setCatalogName(catalog) @@ -55,13 +54,10 @@ class SparkMetadataOperationSuite extends HiveThriftJdbcTest { schemaReq.setSchemaName(schemaPattern) } - val schemaResp = client.GetSchemas(schemaReq) - JdbcUtils.verifySuccess(schemaResp.getStatus) - rs = new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) - .setStmtHandle(schemaResp.getOperationHandle) + .setStmtHandle(client.GetSchemas(schemaReq).getOperationHandle) .build() f(rs) } finally { @@ -110,28 +106,24 @@ class SparkMetadataOperationSuite extends HiveThriftJdbcTest { val connection = new HiveConnection(s"jdbc:hive2://localhost:$serverPort", new Properties) val user = System.getProperty("user.name") val transport = PlainSaslHelper.getPlainTransport(user, "anonymous", rawTransport) - val client = new TCLIService.Client(new TBinaryProtocol(transport)) + val client = new ThriftserverShimUtils.Client(new TBinaryProtocol(transport)) transport.open() var rs: HiveQueryResultSet = null try { - val openResp = client.OpenSession(new TOpenSessionReq) + val openResp = client.OpenSession(new ThriftserverShimUtils.TOpenSessionReq) val sessHandle = openResp.getSessionHandle - val getTableReq = new TGetTablesReq(sessHandle) + val getTableReq = new ThriftserverShimUtils.TGetTablesReq(sessHandle) getTableReq.setSchemaName(schema) getTableReq.setTableName(tableNamePattern) getTableReq.setTableTypes(tableTypes) - val getTableResp = client.GetTables(getTableReq) - - JdbcUtils.verifySuccess(getTableResp.getStatus) - rs = new HiveQueryResultSet.Builder(connection) .setClient(client) .setSessionHandle(sessHandle) - .setStmtHandle(getTableResp.getOperationHandle) + .setStmtHandle(client.GetTables(getTableReq).getOperationHandle) .build() f(rs) diff --git a/sql/hive-thriftserver/v1.2.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala b/sql/hive-thriftserver/v1.2.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala new file mode 100644 index 0000000000000..bb50496f898ad --- /dev/null +++ b/sql/hive-thriftserver/v1.2.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.spark.sql.hive.thriftserver + +import org.apache.commons.logging.LogFactory +import org.apache.hadoop.hive.ql.session.SessionState +import org.apache.hive.service.cli.{RowSet, RowSetFactory, TableSchema} + +/** + * Various utilities for hive-thriftserver used to upgrade the built-in Hive. + */ +private[thriftserver] object ThriftserverShimUtils { + + private[thriftserver] type TProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion + private[thriftserver] type Client = org.apache.hive.service.cli.thrift.TCLIService.Client + private[thriftserver] type TOpenSessionReq = org.apache.hive.service.cli.thrift.TOpenSessionReq + private[thriftserver] type TGetSchemasReq = org.apache.hive.service.cli.thrift.TGetSchemasReq + private[thriftserver] type TGetTablesReq = org.apache.hive.service.cli.thrift.TGetTablesReq + + private[thriftserver] def getConsole: SessionState.LogHelper = { + val LOG = LogFactory.getLog(classOf[SparkSQLCLIDriver]) + new SessionState.LogHelper(LOG) + } + + private[thriftserver] def resultRowSet( + getResultSetSchema: TableSchema, + getProtocolVersion: TProtocolVersion): RowSet = { + RowSetFactory.create(getResultSetSchema, getProtocolVersion) + } + +} diff --git a/sql/hive-thriftserver/v2.3.5/if/TCLIService.thrift b/sql/hive-thriftserver/v2.3.5/if/TCLIService.thrift index 7cd6fa37cec37..824b04919073a 100644 --- a/sql/hive-thriftserver/v2.3.5/if/TCLIService.thrift +++ b/sql/hive-thriftserver/v2.3.5/if/TCLIService.thrift @@ -32,14 +32,14 @@ // * Service names begin with the letter "T", use a capital letter for each // new word (with no underscores), and end with the word "Service". -namespace java org.apache.hive.service.cli.thrift -namespace cpp apache.hive.service.cli.thrift +namespace java org.apache.hive.service.rpc.thrift +namespace cpp apache.hive.service.rpc.thrift // List of protocol versions. A new token should be // added to the end of this list every time a change is made. enum TProtocolVersion { HIVE_CLI_SERVICE_PROTOCOL_V1, - + // V2 adds support for asynchronous execution HIVE_CLI_SERVICE_PROTOCOL_V2 @@ -60,6 +60,12 @@ enum TProtocolVersion { // V8 adds support for interval types HIVE_CLI_SERVICE_PROTOCOL_V8 + + // V9 adds support for serializing ResultSets in SerDe + HIVE_CLI_SERVICE_PROTOCOL_V9 + + // V10 adds support for in place updates via GetOperationStatus + HIVE_CLI_SERVICE_PROTOCOL_V10 } enum TTypeId { @@ -86,7 +92,7 @@ enum TTypeId { INTERVAL_YEAR_MONTH_TYPE, INTERVAL_DAY_TIME_TYPE } - + const set PRIMITIVE_TYPES = [ TTypeId.BOOLEAN_TYPE, TTypeId.TINYINT_TYPE, @@ -265,7 +271,7 @@ struct TColumnDesc { // The type descriptor for this column 2: required TTypeDesc typeDesc - + // The ordinal position of this column in the schema 3: required i32 position @@ -402,6 +408,8 @@ struct TRowSet { 1: required i64 startRowOffset 2: required list rows 3: optional list columns + 4: optional binary binaryColumns + 5: optional i32 columnCount } // The return status code contained in each response. @@ -456,6 +464,9 @@ enum TOperationState { // The operation is in an pending state PENDING_STATE, + + // The operation is in an timedout state + TIMEDOUT_STATE, } // A string identifier. This is interpreted literally. @@ -551,7 +562,7 @@ struct TOperationHandle { // which operations may be executed. struct TOpenSessionReq { // The version of the HiveServer2 protocol that the client is using. - 1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8 + 1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 // Username and password for authentication. // Depending on the authentication scheme being used, @@ -570,7 +581,7 @@ struct TOpenSessionResp { 1: required TStatus status // The protocol version that the server is using. - 2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8 + 2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10 // Session Handle 3: optional TSessionHandle sessionHandle @@ -661,7 +672,7 @@ union TGetInfoValue { // The function returns general information about the data source // using the same keys as ODBC. struct TGetInfoReq { - // The session to run this request against + // The sesssion to run this request against 1: required TSessionHandle sessionHandle 2: required TGetInfoType infoType @@ -692,9 +703,12 @@ struct TExecuteStatementReq { // is executed. These properties apply to this statement // only and will not affect the subsequent state of the Session. 3: optional map confOverlay - + // Execute asynchronously when runAsync is true 4: optional bool runAsync = false + + // The number of seconds after which the query will timeout on the server + 5: optional i64 queryTimeout = 0 } struct TExecuteStatementResp { @@ -718,13 +732,13 @@ struct TGetTypeInfoReq { struct TGetTypeInfoResp { 1: required TStatus status 2: optional TOperationHandle operationHandle -} +} // GetCatalogs() // -// Returns the list of catalogs (databases) -// Results are ordered by TABLE_CATALOG +// Returns the list of catalogs (databases) +// Results are ordered by TABLE_CATALOG // // Resultset columns : // col1 @@ -834,9 +848,9 @@ struct TGetTablesResp { // GetTableTypes() // -// Returns the table types available in this database. -// The results are ordered by table type. -// +// Returns the table types available in this database. +// The results are ordered by table type. +// // col1 // name: TABLE_TYPE // type: STRING @@ -857,8 +871,8 @@ struct TGetTableTypesResp { // Returns a list of columns in the specified tables. // The information is returned as a result set which can be fetched // using the OperationHandle provided in the response. -// Results are ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, -// and ORDINAL_POSITION. +// Results are ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME, +// and ORDINAL_POSITION. // // Result Set Columns are the same as those for the ODBC CLIColumns // function. @@ -954,7 +968,53 @@ struct TGetFunctionsResp { 1: required TStatus status 2: optional TOperationHandle operationHandle } - + +struct TGetPrimaryKeysReq { + // Session to run this request against + 1: required TSessionHandle sessionHandle + + // Name of the catalog. + 2: optional TIdentifier catalogName + + // Name of the schema. + 3: optional TIdentifier schemaName + + // Name of the table. + 4: optional TIdentifier tableName +} + +struct TGetPrimaryKeysResp { + 1: required TStatus status + 2: optional TOperationHandle operationHandle +} + +struct TGetCrossReferenceReq { + // Session to run this request against + 1: required TSessionHandle sessionHandle + + // Name of the parent catalog. + 2: optional TIdentifier parentCatalogName + + // Name of the parent schema. + 3: optional TIdentifier parentSchemaName + + // Name of the parent table. + 4: optional TIdentifier parentTableName + + // Name of the foreign catalog. + 5: optional TIdentifier foreignCatalogName + + // Name of the foreign schema. + 6: optional TIdentifier foreignSchemaName + + // Name of the foreign table. + 7: optional TIdentifier foreignTableName +} + +struct TGetCrossReferenceResp { + 1: required TStatus status + 2: optional TOperationHandle operationHandle +} // GetOperationStatus() // @@ -962,6 +1022,8 @@ struct TGetFunctionsResp { struct TGetOperationStatusReq { // Session to run this request against 1: required TOperationHandle operationHandle + // optional arguments to get progress information + 2: optional bool getProgressUpdate } struct TGetOperationStatusResp { @@ -977,6 +1039,21 @@ struct TGetOperationStatusResp { // Error message 5: optional string errorMessage + + // List of statuses of sub tasks + 6: optional string taskStatus + + // When was the operation started + 7: optional i64 operationStarted + + // When was the operation completed + 8: optional i64 operationCompleted + + // If the operation has the result + 9: optional bool hasResultSet + + 10: optional TProgressUpdateResp progressUpdateResponse + } @@ -1032,7 +1109,7 @@ enum TFetchOrientation { FETCH_PRIOR, // Return the rowset at the given fetch offset relative - // to the current rowset. + // to the curren rowset. // NOT SUPPORTED FETCH_RELATIVE, @@ -1059,7 +1136,7 @@ struct TFetchResultsReq { // The fetch orientation. For V1 this must be either // FETCH_NEXT or FETCH_FIRST. Defaults to FETCH_NEXT. 2: required TFetchOrientation orientation = TFetchOrientation.FETCH_NEXT - + // Max number of rows that should be returned in // the rowset. 3: required i64 maxRows @@ -1132,6 +1209,21 @@ struct TRenewDelegationTokenResp { 1: required TStatus status } +enum TJobExecutionStatus { + IN_PROGRESS, + COMPLETE, + NOT_AVAILABLE +} + +struct TProgressUpdateResp { + 1: required list headerNames + 2: required list> rows + 3: required double progressedPercentage + 4: required TJobExecutionStatus status + 5: required string footerSummary + 6: required i64 startTime +} + service TCLIService { TOpenSessionResp OpenSession(1:TOpenSessionReq req); @@ -1156,8 +1248,12 @@ service TCLIService { TGetFunctionsResp GetFunctions(1:TGetFunctionsReq req); + TGetPrimaryKeysResp GetPrimaryKeys(1:TGetPrimaryKeysReq req); + + TGetCrossReferenceResp GetCrossReference(1:TGetCrossReferenceReq req); + TGetOperationStatusResp GetOperationStatus(1:TGetOperationStatusReq req); - + TCancelOperationResp CancelOperation(1:TCancelOperationReq req); TCloseOperationResp CloseOperation(1:TCloseOperationReq req); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java deleted file mode 100644 index 25a38b178428a..0000000000000 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hive.service.cli.thrift; - -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class TCLIServiceConstants { - - public static final Set PRIMITIVE_TYPES = new HashSet(); - static { - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.BOOLEAN_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.TINYINT_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.SMALLINT_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.INT_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.BIGINT_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.FLOAT_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DOUBLE_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.STRING_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.TIMESTAMP_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.BINARY_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DECIMAL_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE); - PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE); - } - - public static final Set COMPLEX_TYPES = new HashSet(); - static { - COMPLEX_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.ARRAY_TYPE); - COMPLEX_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.MAP_TYPE); - COMPLEX_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.STRUCT_TYPE); - COMPLEX_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.UNION_TYPE); - COMPLEX_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.USER_DEFINED_TYPE); - } - - public static final Set COLLECTION_TYPES = new HashSet(); - static { - COLLECTION_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.ARRAY_TYPE); - COLLECTION_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.MAP_TYPE); - } - - public static final Map TYPE_NAMES = new HashMap(); - static { - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.BOOLEAN_TYPE, "BOOLEAN"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.TINYINT_TYPE, "TINYINT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.SMALLINT_TYPE, "SMALLINT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.INT_TYPE, "INT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.BIGINT_TYPE, "BIGINT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.FLOAT_TYPE, "FLOAT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DOUBLE_TYPE, "DOUBLE"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.STRING_TYPE, "STRING"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.TIMESTAMP_TYPE, "TIMESTAMP"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.BINARY_TYPE, "BINARY"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.ARRAY_TYPE, "ARRAY"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.MAP_TYPE, "MAP"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.STRUCT_TYPE, "STRUCT"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.UNION_TYPE, "UNIONTYPE"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DECIMAL_TYPE, "DECIMAL"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE, "NULL"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE, "DATE"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE, "VARCHAR"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE, "CHAR"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE, "INTERVAL_YEAR_MONTH"); - TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE, "INTERVAL_DAY_TIME"); - } - - public static final String CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"; - - public static final String PRECISION = "precision"; - - public static final String SCALE = "scale"; - -} diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java index 6323d34eac734..358e322632144 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TArrayTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TArrayTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TArrayTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TArrayTypeEntry"); private static final org.apache.thrift.protocol.TField OBJECT_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("objectTypePtr", org.apache.thrift.protocol.TType.I32, (short)1); @@ -181,7 +185,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case OBJECT_TYPE_PTR: - return Integer.valueOf(getObjectTypePtr()); + return getObjectTypePtr(); } throw new IllegalStateException(); @@ -227,30 +231,30 @@ public boolean equals(TArrayTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_objectTypePtr = true; - builder.append(present_objectTypePtr); + list.add(present_objectTypePtr); if (present_objectTypePtr) - builder.append(objectTypePtr); + list.add(objectTypePtr); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TArrayTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TArrayTypeEntry typedOther = (TArrayTypeEntry)other; - lastComparison = Boolean.valueOf(isSetObjectTypePtr()).compareTo(typedOther.isSetObjectTypePtr()); + lastComparison = Boolean.valueOf(isSetObjectTypePtr()).compareTo(other.isSetObjectTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetObjectTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectTypePtr, typedOther.objectTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectTypePtr, other.objectTypePtr); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java index 6b1b054d1acad..a869cee007c0b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBinaryColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBinaryColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TBinaryColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TBinaryColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBinaryColumn"); 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); @@ -129,7 +133,7 @@ public TBinaryColumn( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,17 +141,11 @@ public TBinaryColumn( */ public TBinaryColumn(TBinaryColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (ByteBuffer other_element : other.values) { - ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element); -; - __this__values.add(temp_binary_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -205,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -315,45 +313,45 @@ public boolean equals(TBinaryColumn that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TBinaryColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TBinaryColumn typedOther = (TBinaryColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -382,7 +380,7 @@ public String toString() { if (this.values == null) { sb.append("null"); } else { - sb.append(this.values); + org.apache.thrift.TBaseHelper.toString(this.values, sb); } first = false; if (!first) sb.append(", "); @@ -449,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBinaryColumn struc { org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); struct.values = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) + ByteBuffer _elem111; + for (int _i112 = 0; _i112 < _list110.size; ++_i112) { - ByteBuffer _elem112; // optional - _elem112 = iprot.readBinary(); - struct.values.add(_elem112); + _elem111 = iprot.readBinary(); + struct.values.add(_elem111); } iprot.readListEnd(); } @@ -533,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TBinaryColumn struct { org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.values = new ArrayList(_list115.size); - for (int _i116 = 0; _i116 < _list115.size; ++_i116) + ByteBuffer _elem116; + for (int _i117 = 0; _i117 < _list115.size; ++_i117) { - ByteBuffer _elem117; // optional - _elem117 = iprot.readBinary(); - struct.values.add(_elem117); + _elem116 = iprot.readBinary(); + struct.values.add(_elem116); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java index efd571cfdfbbf..9bb636672aa1e 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TBoolColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TBoolColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolColumn"); 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); @@ -129,7 +133,7 @@ public TBoolColumn( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TBoolColumn( */ public TBoolColumn(TBoolColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Boolean other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TBoolColumn that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TBoolColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TBoolColumn typedOther = (TBoolColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolColumn struct) { org.apache.thrift.protocol.TList _list54 = iprot.readListBegin(); struct.values = new ArrayList(_list54.size); - for (int _i55 = 0; _i55 < _list54.size; ++_i55) + boolean _elem55; + for (int _i56 = 0; _i56 < _list54.size; ++_i56) { - boolean _elem56; // optional - _elem56 = iprot.readBool(); - struct.values.add(_elem56); + _elem55 = iprot.readBool(); + struct.values.add(_elem55); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TBoolColumn struct) { org.apache.thrift.protocol.TList _list59 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32()); struct.values = new ArrayList(_list59.size); - for (int _i60 = 0; _i60 < _list59.size; ++_i60) + boolean _elem60; + for (int _i61 = 0; _i61 < _list59.size; ++_i61) { - boolean _elem61; // optional - _elem61 = iprot.readBool(); - struct.values.add(_elem61); + _elem60 = iprot.readBool(); + struct.values.add(_elem60); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java index c7495ee79e4b5..87b3070a89b11 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TBoolValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TBoolValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TBoolValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TBoolValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BOOL, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Boolean.valueOf(isValue()); + return isValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TBoolValue that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TBoolValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TBoolValue typedOther = (TBoolValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java index 169bfdeab3eea..68b3d3c31eb03 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TByteColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TByteColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteColumn"); 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); @@ -129,7 +133,7 @@ public TByteColumn( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TByteColumn( */ public TByteColumn(TByteColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Byte other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TByteColumn that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TByteColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TByteColumn typedOther = (TByteColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TByteColumn struct) { org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); struct.values = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) + byte _elem63; + for (int _i64 = 0; _i64 < _list62.size; ++_i64) { - byte _elem64; // optional - _elem64 = iprot.readByte(); - struct.values.add(_elem64); + _elem63 = iprot.readByte(); + struct.values.add(_elem63); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TByteColumn struct) { org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, iprot.readI32()); struct.values = new ArrayList(_list67.size); - for (int _i68 = 0; _i68 < _list67.size; ++_i68) + byte _elem68; + for (int _i69 = 0; _i69 < _list67.size; ++_i69) { - byte _elem69; // optional - _elem69 = iprot.readByte(); - struct.values.add(_elem69); + _elem68 = iprot.readByte(); + struct.values.add(_elem68); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java index 23d9693759968..a3d5951335fa7 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TByteValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TByteValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TByteValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TByteValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BYTE, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Byte.valueOf(getValue()); + return getValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TByteValue that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TByteValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TByteValue typedOther = (TByteValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java similarity index 80% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java index 54851b8d51317..6584c24a0142a 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIService.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,12 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class TCLIService { public interface Iface { @@ -57,6 +61,10 @@ public interface Iface { public TGetFunctionsResp GetFunctions(TGetFunctionsReq req) throws org.apache.thrift.TException; + public TGetPrimaryKeysResp GetPrimaryKeys(TGetPrimaryKeysReq req) throws org.apache.thrift.TException; + + public TGetCrossReferenceResp GetCrossReference(TGetCrossReferenceReq req) throws org.apache.thrift.TException; + public TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req) throws org.apache.thrift.TException; public TCancelOperationResp CancelOperation(TCancelOperationReq req) throws org.apache.thrift.TException; @@ -77,43 +85,47 @@ public interface Iface { public interface AsyncIface { - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -390,6 +402,52 @@ public TGetFunctionsResp recv_GetFunctions() throws org.apache.thrift.TException throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetFunctions failed: unknown result"); } + public TGetPrimaryKeysResp GetPrimaryKeys(TGetPrimaryKeysReq req) throws org.apache.thrift.TException + { + send_GetPrimaryKeys(req); + return recv_GetPrimaryKeys(); + } + + public void send_GetPrimaryKeys(TGetPrimaryKeysReq req) throws org.apache.thrift.TException + { + GetPrimaryKeys_args args = new GetPrimaryKeys_args(); + args.setReq(req); + sendBase("GetPrimaryKeys", args); + } + + public TGetPrimaryKeysResp recv_GetPrimaryKeys() throws org.apache.thrift.TException + { + GetPrimaryKeys_result result = new GetPrimaryKeys_result(); + receiveBase(result, "GetPrimaryKeys"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetPrimaryKeys failed: unknown result"); + } + + public TGetCrossReferenceResp GetCrossReference(TGetCrossReferenceReq req) throws org.apache.thrift.TException + { + send_GetCrossReference(req); + return recv_GetCrossReference(); + } + + public void send_GetCrossReference(TGetCrossReferenceReq req) throws org.apache.thrift.TException + { + GetCrossReference_args args = new GetCrossReference_args(); + args.setReq(req); + sendBase("GetCrossReference", args); + } + + public TGetCrossReferenceResp recv_GetCrossReference() throws org.apache.thrift.TException + { + GetCrossReference_result result = new GetCrossReference_result(); + receiveBase(result, "GetCrossReference"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetCrossReference failed: unknown result"); + } + public TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req) throws org.apache.thrift.TException { send_GetOperationStatus(req); @@ -592,7 +650,7 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); OpenSession_call method_call = new OpenSession_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -601,7 +659,7 @@ public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethod public static class OpenSession_call extends org.apache.thrift.async.TAsyncMethodCall { private TOpenSessionReq req; - public OpenSession_call(TOpenSessionReq 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 { + public OpenSession_call(TOpenSessionReq 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; } @@ -624,7 +682,7 @@ public TOpenSessionResp getResult() throws org.apache.thrift.TException { } } - public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CloseSession_call method_call = new CloseSession_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -633,7 +691,7 @@ public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMeth public static class CloseSession_call extends org.apache.thrift.async.TAsyncMethodCall { private TCloseSessionReq req; - public CloseSession_call(TCloseSessionReq 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 { + public CloseSession_call(TCloseSessionReq 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; } @@ -656,7 +714,7 @@ public TCloseSessionResp getResult() throws org.apache.thrift.TException { } } - public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetInfo_call method_call = new GetInfo_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -665,7 +723,7 @@ public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback public static class GetInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetInfoReq req; - public GetInfo_call(TGetInfoReq 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 { + public GetInfo_call(TGetInfoReq 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; } @@ -688,7 +746,7 @@ public TGetInfoResp getResult() throws org.apache.thrift.TException { } } - public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); ExecuteStatement_call method_call = new ExecuteStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -697,7 +755,7 @@ public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.A public static class ExecuteStatement_call extends org.apache.thrift.async.TAsyncMethodCall { private TExecuteStatementReq req; - public ExecuteStatement_call(TExecuteStatementReq 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 { + public ExecuteStatement_call(TExecuteStatementReq 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; } @@ -720,7 +778,7 @@ public TExecuteStatementResp getResult() throws org.apache.thrift.TException { } } - public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTypeInfo_call method_call = new GetTypeInfo_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -729,7 +787,7 @@ public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethod public static class GetTypeInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTypeInfoReq req; - public GetTypeInfo_call(TGetTypeInfoReq 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 { + public GetTypeInfo_call(TGetTypeInfoReq 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; } @@ -752,7 +810,7 @@ public TGetTypeInfoResp getResult() throws org.apache.thrift.TException { } } - public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetCatalogs_call method_call = new GetCatalogs_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -761,7 +819,7 @@ public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethod public static class GetCatalogs_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetCatalogsReq req; - public GetCatalogs_call(TGetCatalogsReq 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 { + public GetCatalogs_call(TGetCatalogsReq 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; } @@ -784,7 +842,7 @@ public TGetCatalogsResp getResult() throws org.apache.thrift.TException { } } - public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetSchemas_call method_call = new GetSchemas_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -793,7 +851,7 @@ public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCa public static class GetSchemas_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetSchemasReq req; - public GetSchemas_call(TGetSchemasReq 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 { + public GetSchemas_call(TGetSchemasReq 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; } @@ -816,7 +874,7 @@ public TGetSchemasResp getResult() throws org.apache.thrift.TException { } } - public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTables_call method_call = new GetTables_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -825,7 +883,7 @@ public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCall public static class GetTables_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTablesReq req; - public GetTables_call(TGetTablesReq 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 { + public GetTables_call(TGetTablesReq 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; } @@ -848,7 +906,7 @@ public TGetTablesResp getResult() throws org.apache.thrift.TException { } } - public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTableTypes_call method_call = new GetTableTypes_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -857,7 +915,7 @@ public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMe public static class GetTableTypes_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTableTypesReq req; - public GetTableTypes_call(TGetTableTypesReq 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 { + public GetTableTypes_call(TGetTableTypesReq 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; } @@ -880,7 +938,7 @@ public TGetTableTypesResp getResult() throws org.apache.thrift.TException { } } - public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetColumns_call method_call = new GetColumns_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -889,7 +947,7 @@ public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCa public static class GetColumns_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetColumnsReq req; - public GetColumns_call(TGetColumnsReq 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 { + public GetColumns_call(TGetColumnsReq 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; } @@ -912,7 +970,7 @@ public TGetColumnsResp getResult() throws org.apache.thrift.TException { } } - public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetFunctions_call method_call = new GetFunctions_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -921,7 +979,7 @@ public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMeth public static class GetFunctions_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetFunctionsReq req; - public GetFunctions_call(TGetFunctionsReq 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 { + public GetFunctions_call(TGetFunctionsReq 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; } @@ -944,7 +1002,71 @@ public TGetFunctionsResp getResult() throws org.apache.thrift.TException { } } - public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + GetPrimaryKeys_call method_call = new GetPrimaryKeys_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class GetPrimaryKeys_call extends org.apache.thrift.async.TAsyncMethodCall { + private TGetPrimaryKeysReq req; + public GetPrimaryKeys_call(TGetPrimaryKeysReq 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("GetPrimaryKeys", org.apache.thrift.protocol.TMessageType.CALL, 0)); + GetPrimaryKeys_args args = new GetPrimaryKeys_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public TGetPrimaryKeysResp 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_GetPrimaryKeys(); + } + } + + public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + GetCrossReference_call method_call = new GetCrossReference_call(req, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class GetCrossReference_call extends org.apache.thrift.async.TAsyncMethodCall { + private TGetCrossReferenceReq req; + public GetCrossReference_call(TGetCrossReferenceReq 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("GetCrossReference", org.apache.thrift.protocol.TMessageType.CALL, 0)); + GetCrossReference_args args = new GetCrossReference_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public TGetCrossReferenceResp 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_GetCrossReference(); + } + } + + public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetOperationStatus_call method_call = new GetOperationStatus_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -953,7 +1075,7 @@ public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.asy public static class GetOperationStatus_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetOperationStatusReq req; - public GetOperationStatus_call(TGetOperationStatusReq 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 { + public GetOperationStatus_call(TGetOperationStatusReq 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; } @@ -976,7 +1098,7 @@ public TGetOperationStatusResp getResult() throws org.apache.thrift.TException { } } - public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CancelOperation_call method_call = new CancelOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -985,7 +1107,7 @@ public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.Asy public static class CancelOperation_call extends org.apache.thrift.async.TAsyncMethodCall { private TCancelOperationReq req; - public CancelOperation_call(TCancelOperationReq 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 { + public CancelOperation_call(TCancelOperationReq 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; } @@ -1008,7 +1130,7 @@ public TCancelOperationResp getResult() throws org.apache.thrift.TException { } } - public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CloseOperation_call method_call = new CloseOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1017,7 +1139,7 @@ public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.Async public static class CloseOperation_call extends org.apache.thrift.async.TAsyncMethodCall { private TCloseOperationReq req; - public CloseOperation_call(TCloseOperationReq 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 { + public CloseOperation_call(TCloseOperationReq 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; } @@ -1040,7 +1162,7 @@ public TCloseOperationResp getResult() throws org.apache.thrift.TException { } } - public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetResultSetMetadata_call method_call = new GetResultSetMetadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1049,7 +1171,7 @@ public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift public static class GetResultSetMetadata_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetResultSetMetadataReq req; - public GetResultSetMetadata_call(TGetResultSetMetadataReq 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 { + public GetResultSetMetadata_call(TGetResultSetMetadataReq 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; } @@ -1072,7 +1194,7 @@ public TGetResultSetMetadataResp getResult() throws org.apache.thrift.TException } } - public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); FetchResults_call method_call = new FetchResults_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1081,7 +1203,7 @@ public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMeth public static class FetchResults_call extends org.apache.thrift.async.TAsyncMethodCall { private TFetchResultsReq req; - public FetchResults_call(TFetchResultsReq 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 { + public FetchResults_call(TFetchResultsReq 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; } @@ -1104,7 +1226,7 @@ public TFetchResultsResp getResult() throws org.apache.thrift.TException { } } - public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetDelegationToken_call method_call = new GetDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1113,7 +1235,7 @@ public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.asy public static class GetDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetDelegationTokenReq req; - public GetDelegationToken_call(TGetDelegationTokenReq 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 { + public GetDelegationToken_call(TGetDelegationTokenReq 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; } @@ -1136,7 +1258,7 @@ public TGetDelegationTokenResp getResult() throws org.apache.thrift.TException { } } - public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CancelDelegationToken_call method_call = new CancelDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1145,7 +1267,7 @@ public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thri public static class CancelDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TCancelDelegationTokenReq req; - public CancelDelegationToken_call(TCancelDelegationTokenReq 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 { + public CancelDelegationToken_call(TCancelDelegationTokenReq 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; } @@ -1168,7 +1290,7 @@ public TCancelDelegationTokenResp getResult() throws org.apache.thrift.TExceptio } } - public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); RenewDelegationToken_call method_call = new RenewDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1177,7 +1299,7 @@ public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift public static class RenewDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TRenewDelegationTokenReq req; - public RenewDelegationToken_call(TRenewDelegationTokenReq 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 { + public RenewDelegationToken_call(TRenewDelegationTokenReq 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; } @@ -1224,6 +1346,8 @@ protected Processor(I iface, Map extends org.apache.thrift.ProcessFunction { + public GetPrimaryKeys() { + super("GetPrimaryKeys"); + } + + public GetPrimaryKeys_args getEmptyArgsInstance() { + return new GetPrimaryKeys_args(); + } + + protected boolean isOneway() { + return false; + } + + public GetPrimaryKeys_result getResult(I iface, GetPrimaryKeys_args args) throws org.apache.thrift.TException { + GetPrimaryKeys_result result = new GetPrimaryKeys_result(); + result.success = iface.GetPrimaryKeys(args.req); + return result; + } + } + + public static class GetCrossReference extends org.apache.thrift.ProcessFunction { + public GetCrossReference() { + super("GetCrossReference"); + } + + public GetCrossReference_args getEmptyArgsInstance() { + return new GetCrossReference_args(); + } + + protected boolean isOneway() { + return false; + } + + public GetCrossReference_result getResult(I iface, GetCrossReference_args args) throws org.apache.thrift.TException { + GetCrossReference_result result = new GetCrossReference_result(); + result.success = iface.GetCrossReference(args.req); + return result; + } + } + public static class GetOperationStatus extends org.apache.thrift.ProcessFunction { public GetOperationStatus() { super("GetOperationStatus"); @@ -1617,128 +1781,2688 @@ public RenewDelegationToken_result getResult(I iface, RenewDelegationToken_args } - public static class OpenSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_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); + public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + public AsyncProcessor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OpenSession_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OpenSession_argsTupleSchemeFactory()); + protected AsyncProcessor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); } - private TOpenSessionReq req; // required + private static Map> getProcessMap(Map> processMap) { + processMap.put("OpenSession", new OpenSession()); + processMap.put("CloseSession", new CloseSession()); + processMap.put("GetInfo", new GetInfo()); + processMap.put("ExecuteStatement", new ExecuteStatement()); + processMap.put("GetTypeInfo", new GetTypeInfo()); + processMap.put("GetCatalogs", new GetCatalogs()); + processMap.put("GetSchemas", new GetSchemas()); + processMap.put("GetTables", new GetTables()); + processMap.put("GetTableTypes", new GetTableTypes()); + processMap.put("GetColumns", new GetColumns()); + processMap.put("GetFunctions", new GetFunctions()); + processMap.put("GetPrimaryKeys", new GetPrimaryKeys()); + processMap.put("GetCrossReference", new GetCrossReference()); + processMap.put("GetOperationStatus", new GetOperationStatus()); + processMap.put("CancelOperation", new CancelOperation()); + processMap.put("CloseOperation", new CloseOperation()); + processMap.put("GetResultSetMetadata", new GetResultSetMetadata()); + processMap.put("FetchResults", new FetchResults()); + processMap.put("GetDelegationToken", new GetDelegationToken()); + processMap.put("CancelDelegationToken", new CancelDelegationToken()); + processMap.put("RenewDelegationToken", new RenewDelegationToken()); + return processMap; + } - /** 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"); + public static class OpenSession extends org.apache.thrift.AsyncProcessFunction { + public OpenSession() { + super("OpenSession"); + } - private static final Map byName = new HashMap(); + public OpenSession_args getEmptyArgsInstance() { + return new OpenSession_args(); + } - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TOpenSessionResp o) { + OpenSession_result result = new OpenSession_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; + OpenSession_result result = new OpenSession_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(); + } + }; } - /** - * 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; - } + protected boolean isOneway() { + return false; } - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; + public void start(I iface, OpenSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.OpenSession(args.req,resultHandler); } + } - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); + public static class CloseSession extends org.apache.thrift.AsyncProcessFunction { + public CloseSession() { + super("CloseSession"); } - private final short _thriftId; - private final String _fieldName; + public CloseSession_args getEmptyArgsInstance() { + return new CloseSession_args(); + } - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TCloseSessionResp o) { + CloseSession_result result = new CloseSession_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; + CloseSession_result result = new CloseSession_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(); + } + }; } - public short getThriftFieldId() { - return _thriftId; + protected boolean isOneway() { + return false; } - public String getFieldName() { - return _fieldName; + public void start(I iface, CloseSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.CloseSession(args.req,resultHandler); } } - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - 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, TOpenSessionReq.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_args.class, metaDataMap); - } + public static class GetInfo extends org.apache.thrift.AsyncProcessFunction { + public GetInfo() { + super("GetInfo"); + } - public OpenSession_args() { - } + public GetInfo_args getEmptyArgsInstance() { + return new GetInfo_args(); + } - public OpenSession_args( - TOpenSessionReq req) - { - this(); - this.req = req; - } + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetInfoResp o) { + GetInfo_result result = new GetInfo_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; + GetInfo_result result = new GetInfo_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(); + } + }; + } - /** - * Performs a deep copy on other. - */ - public OpenSession_args(OpenSession_args other) { - if (other.isSetReq()) { - this.req = new TOpenSessionReq(other.req); + protected boolean isOneway() { + return false; } - } - public OpenSession_args deepCopy() { - return new OpenSession_args(this); + public void start(I iface, GetInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetInfo(args.req,resultHandler); + } } - @Override - public void clear() { - this.req = null; - } + public static class ExecuteStatement extends org.apache.thrift.AsyncProcessFunction { + public ExecuteStatement() { + super("ExecuteStatement"); + } - public TOpenSessionReq getReq() { - return this.req; - } + public ExecuteStatement_args getEmptyArgsInstance() { + return new ExecuteStatement_args(); + } - public void setReq(TOpenSessionReq req) { - this.req = req; - } + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TExecuteStatementResp o) { + ExecuteStatement_result result = new ExecuteStatement_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; + ExecuteStatement_result result = new ExecuteStatement_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(); + } + }; + } - public void unsetReq() { - this.req = null; + protected boolean isOneway() { + return false; + } + + public void start(I iface, ExecuteStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.ExecuteStatement(args.req,resultHandler); + } } - /** Returns true if field req is set (has been assigned a value) and false otherwise */ + public static class GetTypeInfo extends org.apache.thrift.AsyncProcessFunction { + public GetTypeInfo() { + super("GetTypeInfo"); + } + + public GetTypeInfo_args getEmptyArgsInstance() { + return new GetTypeInfo_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetTypeInfoResp o) { + GetTypeInfo_result result = new GetTypeInfo_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; + GetTypeInfo_result result = new GetTypeInfo_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, GetTypeInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetTypeInfo(args.req,resultHandler); + } + } + + public static class GetCatalogs extends org.apache.thrift.AsyncProcessFunction { + public GetCatalogs() { + super("GetCatalogs"); + } + + public GetCatalogs_args getEmptyArgsInstance() { + return new GetCatalogs_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetCatalogsResp o) { + GetCatalogs_result result = new GetCatalogs_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; + GetCatalogs_result result = new GetCatalogs_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, GetCatalogs_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetCatalogs(args.req,resultHandler); + } + } + + public static class GetSchemas extends org.apache.thrift.AsyncProcessFunction { + public GetSchemas() { + super("GetSchemas"); + } + + public GetSchemas_args getEmptyArgsInstance() { + return new GetSchemas_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetSchemasResp o) { + GetSchemas_result result = new GetSchemas_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; + GetSchemas_result result = new GetSchemas_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, GetSchemas_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetSchemas(args.req,resultHandler); + } + } + + public static class GetTables extends org.apache.thrift.AsyncProcessFunction { + public GetTables() { + super("GetTables"); + } + + public GetTables_args getEmptyArgsInstance() { + return new GetTables_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetTablesResp o) { + GetTables_result result = new GetTables_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; + GetTables_result result = new GetTables_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, GetTables_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetTables(args.req,resultHandler); + } + } + + public static class GetTableTypes extends org.apache.thrift.AsyncProcessFunction { + public GetTableTypes() { + super("GetTableTypes"); + } + + public GetTableTypes_args getEmptyArgsInstance() { + return new GetTableTypes_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetTableTypesResp o) { + GetTableTypes_result result = new GetTableTypes_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; + GetTableTypes_result result = new GetTableTypes_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, GetTableTypes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetTableTypes(args.req,resultHandler); + } + } + + public static class GetColumns extends org.apache.thrift.AsyncProcessFunction { + public GetColumns() { + super("GetColumns"); + } + + public GetColumns_args getEmptyArgsInstance() { + return new GetColumns_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetColumnsResp o) { + GetColumns_result result = new GetColumns_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; + GetColumns_result result = new GetColumns_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, GetColumns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetColumns(args.req,resultHandler); + } + } + + public static class GetFunctions extends org.apache.thrift.AsyncProcessFunction { + public GetFunctions() { + super("GetFunctions"); + } + + public GetFunctions_args getEmptyArgsInstance() { + return new GetFunctions_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetFunctionsResp o) { + GetFunctions_result result = new GetFunctions_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; + GetFunctions_result result = new GetFunctions_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, GetFunctions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetFunctions(args.req,resultHandler); + } + } + + public static class GetPrimaryKeys extends org.apache.thrift.AsyncProcessFunction { + public GetPrimaryKeys() { + super("GetPrimaryKeys"); + } + + public GetPrimaryKeys_args getEmptyArgsInstance() { + return new GetPrimaryKeys_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetPrimaryKeysResp o) { + GetPrimaryKeys_result result = new GetPrimaryKeys_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; + GetPrimaryKeys_result result = new GetPrimaryKeys_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, GetPrimaryKeys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetPrimaryKeys(args.req,resultHandler); + } + } + + public static class GetCrossReference extends org.apache.thrift.AsyncProcessFunction { + public GetCrossReference() { + super("GetCrossReference"); + } + + public GetCrossReference_args getEmptyArgsInstance() { + return new GetCrossReference_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetCrossReferenceResp o) { + GetCrossReference_result result = new GetCrossReference_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; + GetCrossReference_result result = new GetCrossReference_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, GetCrossReference_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetCrossReference(args.req,resultHandler); + } + } + + public static class GetOperationStatus extends org.apache.thrift.AsyncProcessFunction { + public GetOperationStatus() { + super("GetOperationStatus"); + } + + public GetOperationStatus_args getEmptyArgsInstance() { + return new GetOperationStatus_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetOperationStatusResp o) { + GetOperationStatus_result result = new GetOperationStatus_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; + GetOperationStatus_result result = new GetOperationStatus_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, GetOperationStatus_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetOperationStatus(args.req,resultHandler); + } + } + + public static class CancelOperation extends org.apache.thrift.AsyncProcessFunction { + public CancelOperation() { + super("CancelOperation"); + } + + public CancelOperation_args getEmptyArgsInstance() { + return new CancelOperation_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TCancelOperationResp o) { + CancelOperation_result result = new CancelOperation_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; + CancelOperation_result result = new CancelOperation_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, CancelOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.CancelOperation(args.req,resultHandler); + } + } + + public static class CloseOperation extends org.apache.thrift.AsyncProcessFunction { + public CloseOperation() { + super("CloseOperation"); + } + + public CloseOperation_args getEmptyArgsInstance() { + return new CloseOperation_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TCloseOperationResp o) { + CloseOperation_result result = new CloseOperation_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; + CloseOperation_result result = new CloseOperation_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, CloseOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.CloseOperation(args.req,resultHandler); + } + } + + public static class GetResultSetMetadata extends org.apache.thrift.AsyncProcessFunction { + public GetResultSetMetadata() { + super("GetResultSetMetadata"); + } + + public GetResultSetMetadata_args getEmptyArgsInstance() { + return new GetResultSetMetadata_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetResultSetMetadataResp o) { + GetResultSetMetadata_result result = new GetResultSetMetadata_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; + GetResultSetMetadata_result result = new GetResultSetMetadata_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, GetResultSetMetadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetResultSetMetadata(args.req,resultHandler); + } + } + + public static class FetchResults extends org.apache.thrift.AsyncProcessFunction { + public FetchResults() { + super("FetchResults"); + } + + public FetchResults_args getEmptyArgsInstance() { + return new FetchResults_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TFetchResultsResp o) { + FetchResults_result result = new FetchResults_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; + FetchResults_result result = new FetchResults_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, FetchResults_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.FetchResults(args.req,resultHandler); + } + } + + public static class GetDelegationToken extends org.apache.thrift.AsyncProcessFunction { + public GetDelegationToken() { + super("GetDelegationToken"); + } + + public GetDelegationToken_args getEmptyArgsInstance() { + return new GetDelegationToken_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TGetDelegationTokenResp o) { + GetDelegationToken_result result = new GetDelegationToken_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; + GetDelegationToken_result result = new GetDelegationToken_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, GetDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.GetDelegationToken(args.req,resultHandler); + } + } + + public static class CancelDelegationToken extends org.apache.thrift.AsyncProcessFunction { + public CancelDelegationToken() { + super("CancelDelegationToken"); + } + + public CancelDelegationToken_args getEmptyArgsInstance() { + return new CancelDelegationToken_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TCancelDelegationTokenResp o) { + CancelDelegationToken_result result = new CancelDelegationToken_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; + CancelDelegationToken_result result = new CancelDelegationToken_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, CancelDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.CancelDelegationToken(args.req,resultHandler); + } + } + + public static class RenewDelegationToken extends org.apache.thrift.AsyncProcessFunction { + public RenewDelegationToken() { + super("RenewDelegationToken"); + } + + public RenewDelegationToken_args getEmptyArgsInstance() { + return new RenewDelegationToken_args(); + } + + public AsyncMethodCallback getResultHandler(final AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(TRenewDelegationTokenResp o) { + RenewDelegationToken_result result = new RenewDelegationToken_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; + RenewDelegationToken_result result = new RenewDelegationToken_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, RenewDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.RenewDelegationToken(args.req,resultHandler); + } + } + + } + + public static class OpenSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_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 OpenSession_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OpenSession_argsTupleSchemeFactory()); + } + + private TOpenSessionReq 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, TOpenSessionReq.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_args.class, metaDataMap); + } + + public OpenSession_args() { + } + + public OpenSession_args( + TOpenSessionReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public OpenSession_args(OpenSession_args other) { + if (other.isSetReq()) { + this.req = new TOpenSessionReq(other.req); + } + } + + public OpenSession_args deepCopy() { + return new OpenSession_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public TOpenSessionReq getReq() { + return this.req; + } + + public void setReq(TOpenSessionReq 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((TOpenSessionReq)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 OpenSession_args) + return this.equals((OpenSession_args)that); + return false; + } + + public boolean equals(OpenSession_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(OpenSession_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("OpenSession_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 OpenSession_argsStandardSchemeFactory implements SchemeFactory { + public OpenSession_argsStandardScheme getScheme() { + return new OpenSession_argsStandardScheme(); + } + } + + private static class OpenSession_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.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 TOpenSessionReq(); + 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, OpenSession_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 OpenSession_argsTupleSchemeFactory implements SchemeFactory { + public OpenSession_argsTupleScheme getScheme() { + return new OpenSession_argsTupleScheme(); + } + } + + private static class OpenSession_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_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, OpenSession_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TOpenSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class OpenSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_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 OpenSession_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new OpenSession_resultTupleSchemeFactory()); + } + + private TOpenSessionResp 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, TOpenSessionResp.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_result.class, metaDataMap); + } + + public OpenSession_result() { + } + + public OpenSession_result( + TOpenSessionResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public OpenSession_result(OpenSession_result other) { + if (other.isSetSuccess()) { + this.success = new TOpenSessionResp(other.success); + } + } + + public OpenSession_result deepCopy() { + return new OpenSession_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public TOpenSessionResp getSuccess() { + return this.success; + } + + public void setSuccess(TOpenSessionResp 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((TOpenSessionResp)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 OpenSession_result) + return this.equals((OpenSession_result)that); + return false; + } + + public boolean equals(OpenSession_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(OpenSession_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("OpenSession_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 OpenSession_resultStandardSchemeFactory implements SchemeFactory { + public OpenSession_resultStandardScheme getScheme() { + return new OpenSession_resultStandardScheme(); + } + } + + private static class OpenSession_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + 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 TOpenSessionResp(); + 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, OpenSession_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 OpenSession_resultTupleSchemeFactory implements SchemeFactory { + public OpenSession_resultTupleScheme getScheme() { + return new OpenSession_resultTupleScheme(); + } + } + + private static class OpenSession_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_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, OpenSession_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TOpenSessionResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class CloseSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_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 CloseSession_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CloseSession_argsTupleSchemeFactory()); + } + + private TCloseSessionReq 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, TCloseSessionReq.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_args.class, metaDataMap); + } + + public CloseSession_args() { + } + + public CloseSession_args( + TCloseSessionReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public CloseSession_args(CloseSession_args other) { + if (other.isSetReq()) { + this.req = new TCloseSessionReq(other.req); + } + } + + public CloseSession_args deepCopy() { + return new CloseSession_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public TCloseSessionReq getReq() { + return this.req; + } + + public void setReq(TCloseSessionReq 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((TCloseSessionReq)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 CloseSession_args) + return this.equals((CloseSession_args)that); + return false; + } + + public boolean equals(CloseSession_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(CloseSession_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("CloseSession_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 CloseSession_argsStandardSchemeFactory implements SchemeFactory { + public CloseSession_argsStandardScheme getScheme() { + return new CloseSession_argsStandardScheme(); + } + } + + private static class CloseSession_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.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 TCloseSessionReq(); + 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, CloseSession_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 CloseSession_argsTupleSchemeFactory implements SchemeFactory { + public CloseSession_argsTupleScheme getScheme() { + return new CloseSession_argsTupleScheme(); + } + } + + private static class CloseSession_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_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, CloseSession_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.req = new TCloseSessionReq(); + struct.req.read(iprot); + struct.setReqIsSet(true); + } + } + } + + } + + public static class CloseSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_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 CloseSession_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CloseSession_resultTupleSchemeFactory()); + } + + private TCloseSessionResp 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, TCloseSessionResp.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_result.class, metaDataMap); + } + + public CloseSession_result() { + } + + public CloseSession_result( + TCloseSessionResp success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public CloseSession_result(CloseSession_result other) { + if (other.isSetSuccess()) { + this.success = new TCloseSessionResp(other.success); + } + } + + public CloseSession_result deepCopy() { + return new CloseSession_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public TCloseSessionResp getSuccess() { + return this.success; + } + + public void setSuccess(TCloseSessionResp 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((TCloseSessionResp)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 CloseSession_result) + return this.equals((CloseSession_result)that); + return false; + } + + public boolean equals(CloseSession_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(CloseSession_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("CloseSession_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 CloseSession_resultStandardSchemeFactory implements SchemeFactory { + public CloseSession_resultStandardScheme getScheme() { + return new CloseSession_resultStandardScheme(); + } + } + + private static class CloseSession_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + 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 TCloseSessionResp(); + 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, CloseSession_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 CloseSession_resultTupleSchemeFactory implements SchemeFactory { + public CloseSession_resultTupleScheme getScheme() { + return new CloseSession_resultTupleScheme(); + } + } + + private static class CloseSession_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_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, CloseSession_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new TCloseSessionResp(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class GetInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_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 GetInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetInfo_argsTupleSchemeFactory()); + } + + private TGetInfoReq 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, TGetInfoReq.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfo_args.class, metaDataMap); + } + + public GetInfo_args() { + } + + public GetInfo_args( + TGetInfoReq req) + { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public GetInfo_args(GetInfo_args other) { + if (other.isSetReq()) { + this.req = new TGetInfoReq(other.req); + } + } + + public GetInfo_args deepCopy() { + return new GetInfo_args(this); + } + + @Override + public void clear() { + this.req = null; + } + + public TGetInfoReq getReq() { + return this.req; + } + + public void setReq(TGetInfoReq 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; } @@ -1755,7 +4479,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TOpenSessionReq)value); + setReq((TGetInfoReq)value); } break; @@ -1788,12 +4512,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof OpenSession_args) - return this.equals((OpenSession_args)that); + if (that instanceof GetInfo_args) + return this.equals((GetInfo_args)that); return false; } - public boolean equals(OpenSession_args that) { + public boolean equals(GetInfo_args that) { if (that == null) return false; @@ -1811,30 +4535,30 @@ public boolean equals(OpenSession_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(OpenSession_args other) { + @Override + public int compareTo(GetInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - OpenSession_args typedOther = (OpenSession_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -1856,7 +4580,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("OpenSession_args("); + StringBuilder sb = new StringBuilder("GetInfo_args("); boolean first = true; sb.append("req:"); @@ -1894,15 +4618,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class OpenSession_argsStandardSchemeFactory implements SchemeFactory { - public OpenSession_argsStandardScheme getScheme() { - return new OpenSession_argsStandardScheme(); + private static class GetInfo_argsStandardSchemeFactory implements SchemeFactory { + public GetInfo_argsStandardScheme getScheme() { + return new GetInfo_argsStandardScheme(); } } - private static class OpenSession_argsStandardScheme extends StandardScheme { + private static class GetInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -1914,7 +4638,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args st switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TOpenSessionReq(); + struct.req = new TGetInfoReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -1930,7 +4654,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -1945,16 +4669,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_args s } - private static class OpenSession_argsTupleSchemeFactory implements SchemeFactory { - public OpenSession_argsTupleScheme getScheme() { - return new OpenSession_argsTupleScheme(); + private static class GetInfo_argsTupleSchemeFactory implements SchemeFactory { + public GetInfo_argsTupleScheme getScheme() { + return new GetInfo_argsTupleScheme(); } } - private static class OpenSession_argsTupleScheme extends TupleScheme { + private static class GetInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -1967,11 +4691,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_args st } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TOpenSessionReq(); + struct.req = new TGetInfoReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -1980,18 +4704,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args str } - public static class OpenSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_result"); + public static class GetInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_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 OpenSession_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OpenSession_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetInfo_resultTupleSchemeFactory()); } - private TOpenSessionResp success; // required + private TGetInfoResp 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 { @@ -2056,16 +4780,16 @@ public String getFieldName() { 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, TOpenSessionResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetInfoResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OpenSession_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfo_result.class, metaDataMap); } - public OpenSession_result() { + public GetInfo_result() { } - public OpenSession_result( - TOpenSessionResp success) + public GetInfo_result( + TGetInfoResp success) { this(); this.success = success; @@ -2074,14 +4798,14 @@ public OpenSession_result( /** * Performs a deep copy on other. */ - public OpenSession_result(OpenSession_result other) { + public GetInfo_result(GetInfo_result other) { if (other.isSetSuccess()) { - this.success = new TOpenSessionResp(other.success); + this.success = new TGetInfoResp(other.success); } } - public OpenSession_result deepCopy() { - return new OpenSession_result(this); + public GetInfo_result deepCopy() { + return new GetInfo_result(this); } @Override @@ -2089,11 +4813,11 @@ public void clear() { this.success = null; } - public TOpenSessionResp getSuccess() { + public TGetInfoResp getSuccess() { return this.success; } - public void setSuccess(TOpenSessionResp success) { + public void setSuccess(TGetInfoResp success) { this.success = success; } @@ -2118,7 +4842,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TOpenSessionResp)value); + setSuccess((TGetInfoResp)value); } break; @@ -2151,12 +4875,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof OpenSession_result) - return this.equals((OpenSession_result)that); + if (that instanceof GetInfo_result) + return this.equals((GetInfo_result)that); return false; } - public boolean equals(OpenSession_result that) { + public boolean equals(GetInfo_result that) { if (that == null) return false; @@ -2174,30 +4898,30 @@ public boolean equals(OpenSession_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(OpenSession_result other) { + @Override + public int compareTo(GetInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - OpenSession_result typedOther = (OpenSession_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -2219,7 +4943,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("OpenSession_result("); + StringBuilder sb = new StringBuilder("GetInfo_result("); boolean first = true; sb.append("success:"); @@ -2257,15 +4981,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class OpenSession_resultStandardSchemeFactory implements SchemeFactory { - public OpenSession_resultStandardScheme getScheme() { - return new OpenSession_resultStandardScheme(); + private static class GetInfo_resultStandardSchemeFactory implements SchemeFactory { + public GetInfo_resultStandardScheme getScheme() { + return new GetInfo_resultStandardScheme(); } } - private static class OpenSession_resultStandardScheme extends StandardScheme { + private static class GetInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -2277,7 +5001,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TOpenSessionResp(); + struct.success = new TGetInfoResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -2293,7 +5017,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -2308,16 +5032,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, OpenSession_result } - private static class OpenSession_resultTupleSchemeFactory implements SchemeFactory { - public OpenSession_resultTupleScheme getScheme() { - return new OpenSession_resultTupleScheme(); + private static class GetInfo_resultTupleSchemeFactory implements SchemeFactory { + public GetInfo_resultTupleScheme getScheme() { + return new GetInfo_resultTupleScheme(); } } - private static class OpenSession_resultTupleScheme extends TupleScheme { + private static class GetInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -2330,11 +5054,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, OpenSession_result } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TOpenSessionResp(); + struct.success = new TGetInfoResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -2343,18 +5067,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_result s } - public static class CloseSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_args"); + public static class ExecuteStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_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 CloseSession_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CloseSession_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new ExecuteStatement_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ExecuteStatement_argsTupleSchemeFactory()); } - private TCloseSessionReq req; // required + private TExecuteStatementReq 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 { @@ -2419,16 +5143,16 @@ public String getFieldName() { 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, TCloseSessionReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TExecuteStatementReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecuteStatement_args.class, metaDataMap); } - public CloseSession_args() { + public ExecuteStatement_args() { } - public CloseSession_args( - TCloseSessionReq req) + public ExecuteStatement_args( + TExecuteStatementReq req) { this(); this.req = req; @@ -2437,14 +5161,14 @@ public CloseSession_args( /** * Performs a deep copy on other. */ - public CloseSession_args(CloseSession_args other) { + public ExecuteStatement_args(ExecuteStatement_args other) { if (other.isSetReq()) { - this.req = new TCloseSessionReq(other.req); + this.req = new TExecuteStatementReq(other.req); } } - public CloseSession_args deepCopy() { - return new CloseSession_args(this); + public ExecuteStatement_args deepCopy() { + return new ExecuteStatement_args(this); } @Override @@ -2452,11 +5176,11 @@ public void clear() { this.req = null; } - public TCloseSessionReq getReq() { + public TExecuteStatementReq getReq() { return this.req; } - public void setReq(TCloseSessionReq req) { + public void setReq(TExecuteStatementReq req) { this.req = req; } @@ -2481,7 +5205,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TCloseSessionReq)value); + setReq((TExecuteStatementReq)value); } break; @@ -2514,12 +5238,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof CloseSession_args) - return this.equals((CloseSession_args)that); + if (that instanceof ExecuteStatement_args) + return this.equals((ExecuteStatement_args)that); return false; } - public boolean equals(CloseSession_args that) { + public boolean equals(ExecuteStatement_args that) { if (that == null) return false; @@ -2537,30 +5261,30 @@ public boolean equals(CloseSession_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(CloseSession_args other) { + @Override + public int compareTo(ExecuteStatement_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CloseSession_args typedOther = (CloseSession_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -2582,7 +5306,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("CloseSession_args("); + StringBuilder sb = new StringBuilder("ExecuteStatement_args("); boolean first = true; sb.append("req:"); @@ -2620,15 +5344,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class CloseSession_argsStandardSchemeFactory implements SchemeFactory { - public CloseSession_argsStandardScheme getScheme() { - return new CloseSession_argsStandardScheme(); + private static class ExecuteStatement_argsStandardSchemeFactory implements SchemeFactory { + public ExecuteStatement_argsStandardScheme getScheme() { + return new ExecuteStatement_argsStandardScheme(); } } - private static class CloseSession_argsStandardScheme extends StandardScheme { + private static class ExecuteStatement_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -2640,7 +5364,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args s switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TCloseSessionReq(); + struct.req = new TExecuteStatementReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -2656,7 +5380,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -2671,16 +5395,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_args } - private static class CloseSession_argsTupleSchemeFactory implements SchemeFactory { - public CloseSession_argsTupleScheme getScheme() { - return new CloseSession_argsTupleScheme(); + private static class ExecuteStatement_argsTupleSchemeFactory implements SchemeFactory { + public ExecuteStatement_argsTupleScheme getScheme() { + return new ExecuteStatement_argsTupleScheme(); } } - private static class CloseSession_argsTupleScheme extends TupleScheme { + private static class ExecuteStatement_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -2693,11 +5417,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_args s } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TCloseSessionReq(); + struct.req = new TExecuteStatementReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -2706,18 +5430,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_args st } - public static class CloseSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_result"); + public static class ExecuteStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_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 CloseSession_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CloseSession_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new ExecuteStatement_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ExecuteStatement_resultTupleSchemeFactory()); } - private TCloseSessionResp success; // required + private TExecuteStatementResp 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 { @@ -2782,16 +5506,16 @@ public String getFieldName() { 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, TCloseSessionResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TExecuteStatementResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloseSession_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecuteStatement_result.class, metaDataMap); } - public CloseSession_result() { + public ExecuteStatement_result() { } - public CloseSession_result( - TCloseSessionResp success) + public ExecuteStatement_result( + TExecuteStatementResp success) { this(); this.success = success; @@ -2800,14 +5524,14 @@ public CloseSession_result( /** * Performs a deep copy on other. */ - public CloseSession_result(CloseSession_result other) { + public ExecuteStatement_result(ExecuteStatement_result other) { if (other.isSetSuccess()) { - this.success = new TCloseSessionResp(other.success); + this.success = new TExecuteStatementResp(other.success); } } - public CloseSession_result deepCopy() { - return new CloseSession_result(this); + public ExecuteStatement_result deepCopy() { + return new ExecuteStatement_result(this); } @Override @@ -2815,11 +5539,11 @@ public void clear() { this.success = null; } - public TCloseSessionResp getSuccess() { + public TExecuteStatementResp getSuccess() { return this.success; } - public void setSuccess(TCloseSessionResp success) { + public void setSuccess(TExecuteStatementResp success) { this.success = success; } @@ -2844,7 +5568,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TCloseSessionResp)value); + setSuccess((TExecuteStatementResp)value); } break; @@ -2877,12 +5601,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof CloseSession_result) - return this.equals((CloseSession_result)that); + if (that instanceof ExecuteStatement_result) + return this.equals((ExecuteStatement_result)that); return false; } - public boolean equals(CloseSession_result that) { + public boolean equals(ExecuteStatement_result that) { if (that == null) return false; @@ -2900,30 +5624,30 @@ public boolean equals(CloseSession_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(CloseSession_result other) { + @Override + public int compareTo(ExecuteStatement_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CloseSession_result typedOther = (CloseSession_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -2945,7 +5669,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("CloseSession_result("); + StringBuilder sb = new StringBuilder("ExecuteStatement_result("); boolean first = true; sb.append("success:"); @@ -2983,15 +5707,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class CloseSession_resultStandardSchemeFactory implements SchemeFactory { - public CloseSession_resultStandardScheme getScheme() { - return new CloseSession_resultStandardScheme(); + private static class ExecuteStatement_resultStandardSchemeFactory implements SchemeFactory { + public ExecuteStatement_resultStandardScheme getScheme() { + return new ExecuteStatement_resultStandardScheme(); } } - private static class CloseSession_resultStandardScheme extends StandardScheme { + private static class ExecuteStatement_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3003,7 +5727,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TCloseSessionResp(); + struct.success = new TExecuteStatementResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -3019,7 +5743,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3034,16 +5758,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, CloseSession_resul } - private static class CloseSession_resultTupleSchemeFactory implements SchemeFactory { - public CloseSession_resultTupleScheme getScheme() { - return new CloseSession_resultTupleScheme(); + private static class ExecuteStatement_resultTupleSchemeFactory implements SchemeFactory { + public ExecuteStatement_resultTupleScheme getScheme() { + return new ExecuteStatement_resultTupleScheme(); } } - private static class CloseSession_resultTupleScheme extends TupleScheme { + private static class ExecuteStatement_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -3056,11 +5780,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, CloseSession_result } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TCloseSessionResp(); + struct.success = new TExecuteStatementResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -3069,18 +5793,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_result } - public static class GetInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_args"); + public static class GetTypeInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_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 GetInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetTypeInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTypeInfo_argsTupleSchemeFactory()); } - private TGetInfoReq req; // required + private TGetTypeInfoReq 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 { @@ -3145,16 +5869,16 @@ public String getFieldName() { 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, TGetInfoReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTypeInfoReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTypeInfo_args.class, metaDataMap); } - public GetInfo_args() { + public GetTypeInfo_args() { } - public GetInfo_args( - TGetInfoReq req) + public GetTypeInfo_args( + TGetTypeInfoReq req) { this(); this.req = req; @@ -3163,14 +5887,14 @@ public GetInfo_args( /** * Performs a deep copy on other. */ - public GetInfo_args(GetInfo_args other) { + public GetTypeInfo_args(GetTypeInfo_args other) { if (other.isSetReq()) { - this.req = new TGetInfoReq(other.req); + this.req = new TGetTypeInfoReq(other.req); } } - public GetInfo_args deepCopy() { - return new GetInfo_args(this); + public GetTypeInfo_args deepCopy() { + return new GetTypeInfo_args(this); } @Override @@ -3178,11 +5902,11 @@ public void clear() { this.req = null; } - public TGetInfoReq getReq() { + public TGetTypeInfoReq getReq() { return this.req; } - public void setReq(TGetInfoReq req) { + public void setReq(TGetTypeInfoReq req) { this.req = req; } @@ -3207,7 +5931,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetInfoReq)value); + setReq((TGetTypeInfoReq)value); } break; @@ -3240,12 +5964,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetInfo_args) - return this.equals((GetInfo_args)that); + if (that instanceof GetTypeInfo_args) + return this.equals((GetTypeInfo_args)that); return false; } - public boolean equals(GetInfo_args that) { + public boolean equals(GetTypeInfo_args that) { if (that == null) return false; @@ -3263,30 +5987,30 @@ public boolean equals(GetInfo_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetInfo_args other) { + @Override + public int compareTo(GetTypeInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetInfo_args typedOther = (GetInfo_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -3308,7 +6032,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetInfo_args("); + StringBuilder sb = new StringBuilder("GetTypeInfo_args("); boolean first = true; sb.append("req:"); @@ -3346,15 +6070,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetInfo_argsStandardSchemeFactory implements SchemeFactory { - public GetInfo_argsStandardScheme getScheme() { - return new GetInfo_argsStandardScheme(); + private static class GetTypeInfo_argsStandardSchemeFactory implements SchemeFactory { + public GetTypeInfo_argsStandardScheme getScheme() { + return new GetTypeInfo_argsStandardScheme(); } } - private static class GetInfo_argsStandardScheme extends StandardScheme { + private static class GetTypeInfo_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3366,7 +6090,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetInfoReq(); + struct.req = new TGetTypeInfoReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -3382,7 +6106,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3397,16 +6121,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_args struc } - private static class GetInfo_argsTupleSchemeFactory implements SchemeFactory { - public GetInfo_argsTupleScheme getScheme() { - return new GetInfo_argsTupleScheme(); + private static class GetTypeInfo_argsTupleSchemeFactory implements SchemeFactory { + public GetTypeInfo_argsTupleScheme getScheme() { + return new GetTypeInfo_argsTupleScheme(); } } - private static class GetInfo_argsTupleScheme extends TupleScheme { + private static class GetTypeInfo_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -3419,11 +6143,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetInfoReq(); + struct.req = new TGetTypeInfoReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -3432,18 +6156,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) } - public static class GetInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_result"); + public static class GetTypeInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_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 GetInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetTypeInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTypeInfo_resultTupleSchemeFactory()); } - private TGetInfoResp success; // required + private TGetTypeInfoResp 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 { @@ -3508,16 +6232,16 @@ public String getFieldName() { 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, TGetInfoResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTypeInfoResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTypeInfo_result.class, metaDataMap); } - public GetInfo_result() { + public GetTypeInfo_result() { } - public GetInfo_result( - TGetInfoResp success) + public GetTypeInfo_result( + TGetTypeInfoResp success) { this(); this.success = success; @@ -3526,14 +6250,14 @@ public GetInfo_result( /** * Performs a deep copy on other. */ - public GetInfo_result(GetInfo_result other) { + public GetTypeInfo_result(GetTypeInfo_result other) { if (other.isSetSuccess()) { - this.success = new TGetInfoResp(other.success); + this.success = new TGetTypeInfoResp(other.success); } } - public GetInfo_result deepCopy() { - return new GetInfo_result(this); + public GetTypeInfo_result deepCopy() { + return new GetTypeInfo_result(this); } @Override @@ -3541,11 +6265,11 @@ public void clear() { this.success = null; } - public TGetInfoResp getSuccess() { + public TGetTypeInfoResp getSuccess() { return this.success; } - public void setSuccess(TGetInfoResp success) { + public void setSuccess(TGetTypeInfoResp success) { this.success = success; } @@ -3570,7 +6294,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetInfoResp)value); + setSuccess((TGetTypeInfoResp)value); } break; @@ -3603,12 +6327,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetInfo_result) - return this.equals((GetInfo_result)that); + if (that instanceof GetTypeInfo_result) + return this.equals((GetTypeInfo_result)that); return false; } - public boolean equals(GetInfo_result that) { + public boolean equals(GetTypeInfo_result that) { if (that == null) return false; @@ -3626,30 +6350,30 @@ public boolean equals(GetInfo_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetInfo_result other) { + @Override + public int compareTo(GetTypeInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetInfo_result typedOther = (GetInfo_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -3671,7 +6395,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetInfo_result("); + StringBuilder sb = new StringBuilder("GetTypeInfo_result("); boolean first = true; sb.append("success:"); @@ -3709,15 +6433,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetInfo_resultStandardSchemeFactory implements SchemeFactory { - public GetInfo_resultStandardScheme getScheme() { - return new GetInfo_resultStandardScheme(); + private static class GetTypeInfo_resultStandardSchemeFactory implements SchemeFactory { + public GetTypeInfo_resultStandardScheme getScheme() { + return new GetTypeInfo_resultStandardScheme(); } } - private static class GetInfo_resultStandardScheme extends StandardScheme { + private static class GetTypeInfo_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -3729,7 +6453,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_result stru switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetInfoResp(); + struct.success = new TGetTypeInfoResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -3745,7 +6469,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_result stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3760,16 +6484,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetInfo_result str } - private static class GetInfo_resultTupleSchemeFactory implements SchemeFactory { - public GetInfo_resultTupleScheme getScheme() { - return new GetInfo_resultTupleScheme(); + private static class GetTypeInfo_resultTupleSchemeFactory implements SchemeFactory { + public GetTypeInfo_resultTupleScheme getScheme() { + return new GetTypeInfo_resultTupleScheme(); } } - private static class GetInfo_resultTupleScheme extends TupleScheme { + private static class GetTypeInfo_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -3782,11 +6506,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetInfo_result stru } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetInfoResp(); + struct.success = new TGetTypeInfoResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -3795,18 +6519,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struc } - public static class ExecuteStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_args"); + public static class GetCatalogs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_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 ExecuteStatement_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecuteStatement_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetCatalogs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetCatalogs_argsTupleSchemeFactory()); } - private TExecuteStatementReq req; // required + private TGetCatalogsReq 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 { @@ -3871,16 +6595,16 @@ public String getFieldName() { 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, TExecuteStatementReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetCatalogsReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecuteStatement_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCatalogs_args.class, metaDataMap); } - public ExecuteStatement_args() { + public GetCatalogs_args() { } - public ExecuteStatement_args( - TExecuteStatementReq req) + public GetCatalogs_args( + TGetCatalogsReq req) { this(); this.req = req; @@ -3889,14 +6613,14 @@ public ExecuteStatement_args( /** * Performs a deep copy on other. */ - public ExecuteStatement_args(ExecuteStatement_args other) { + public GetCatalogs_args(GetCatalogs_args other) { if (other.isSetReq()) { - this.req = new TExecuteStatementReq(other.req); + this.req = new TGetCatalogsReq(other.req); } } - public ExecuteStatement_args deepCopy() { - return new ExecuteStatement_args(this); + public GetCatalogs_args deepCopy() { + return new GetCatalogs_args(this); } @Override @@ -3904,11 +6628,11 @@ public void clear() { this.req = null; } - public TExecuteStatementReq getReq() { + public TGetCatalogsReq getReq() { return this.req; } - public void setReq(TExecuteStatementReq req) { + public void setReq(TGetCatalogsReq req) { this.req = req; } @@ -3933,7 +6657,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TExecuteStatementReq)value); + setReq((TGetCatalogsReq)value); } break; @@ -3966,12 +6690,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof ExecuteStatement_args) - return this.equals((ExecuteStatement_args)that); + if (that instanceof GetCatalogs_args) + return this.equals((GetCatalogs_args)that); return false; } - public boolean equals(ExecuteStatement_args that) { + public boolean equals(GetCatalogs_args that) { if (that == null) return false; @@ -3989,30 +6713,30 @@ public boolean equals(ExecuteStatement_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(ExecuteStatement_args other) { + @Override + public int compareTo(GetCatalogs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - ExecuteStatement_args typedOther = (ExecuteStatement_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -4034,7 +6758,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("ExecuteStatement_args("); + StringBuilder sb = new StringBuilder("GetCatalogs_args("); boolean first = true; sb.append("req:"); @@ -4072,15 +6796,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class ExecuteStatement_argsStandardSchemeFactory implements SchemeFactory { - public ExecuteStatement_argsStandardScheme getScheme() { - return new ExecuteStatement_argsStandardScheme(); + private static class GetCatalogs_argsStandardSchemeFactory implements SchemeFactory { + public GetCatalogs_argsStandardScheme getScheme() { + return new GetCatalogs_argsStandardScheme(); } } - private static class ExecuteStatement_argsStandardScheme extends StandardScheme { + private static class GetCatalogs_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4092,7 +6816,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_ar switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TExecuteStatementReq(); + struct.req = new TGetCatalogsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -4108,7 +6832,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_ar struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4123,16 +6847,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_a } - private static class ExecuteStatement_argsTupleSchemeFactory implements SchemeFactory { - public ExecuteStatement_argsTupleScheme getScheme() { - return new ExecuteStatement_argsTupleScheme(); + private static class GetCatalogs_argsTupleSchemeFactory implements SchemeFactory { + public GetCatalogs_argsTupleScheme getScheme() { + return new GetCatalogs_argsTupleScheme(); } } - private static class ExecuteStatement_argsTupleScheme extends TupleScheme { + private static class GetCatalogs_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -4145,11 +6869,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_ar } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TExecuteStatementReq(); + struct.req = new TGetCatalogsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -4158,18 +6882,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_arg } - public static class ExecuteStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_result"); + public static class GetCatalogs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_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 ExecuteStatement_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecuteStatement_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetCatalogs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetCatalogs_resultTupleSchemeFactory()); } - private TExecuteStatementResp success; // required + private TGetCatalogsResp 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 { @@ -4234,16 +6958,16 @@ public String getFieldName() { 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, TExecuteStatementResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetCatalogsResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecuteStatement_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCatalogs_result.class, metaDataMap); } - public ExecuteStatement_result() { + public GetCatalogs_result() { } - public ExecuteStatement_result( - TExecuteStatementResp success) + public GetCatalogs_result( + TGetCatalogsResp success) { this(); this.success = success; @@ -4252,14 +6976,14 @@ public ExecuteStatement_result( /** * Performs a deep copy on other. */ - public ExecuteStatement_result(ExecuteStatement_result other) { + public GetCatalogs_result(GetCatalogs_result other) { if (other.isSetSuccess()) { - this.success = new TExecuteStatementResp(other.success); + this.success = new TGetCatalogsResp(other.success); } } - public ExecuteStatement_result deepCopy() { - return new ExecuteStatement_result(this); + public GetCatalogs_result deepCopy() { + return new GetCatalogs_result(this); } @Override @@ -4267,11 +6991,11 @@ public void clear() { this.success = null; } - public TExecuteStatementResp getSuccess() { + public TGetCatalogsResp getSuccess() { return this.success; } - public void setSuccess(TExecuteStatementResp success) { + public void setSuccess(TGetCatalogsResp success) { this.success = success; } @@ -4296,7 +7020,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TExecuteStatementResp)value); + setSuccess((TGetCatalogsResp)value); } break; @@ -4329,12 +7053,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof ExecuteStatement_result) - return this.equals((ExecuteStatement_result)that); + if (that instanceof GetCatalogs_result) + return this.equals((GetCatalogs_result)that); return false; } - public boolean equals(ExecuteStatement_result that) { + public boolean equals(GetCatalogs_result that) { if (that == null) return false; @@ -4352,30 +7076,30 @@ public boolean equals(ExecuteStatement_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(ExecuteStatement_result other) { + @Override + public int compareTo(GetCatalogs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - ExecuteStatement_result typedOther = (ExecuteStatement_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -4397,7 +7121,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("ExecuteStatement_result("); + StringBuilder sb = new StringBuilder("GetCatalogs_result("); boolean first = true; sb.append("success:"); @@ -4435,15 +7159,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class ExecuteStatement_resultStandardSchemeFactory implements SchemeFactory { - public ExecuteStatement_resultStandardScheme getScheme() { - return new ExecuteStatement_resultStandardScheme(); + private static class GetCatalogs_resultStandardSchemeFactory implements SchemeFactory { + public GetCatalogs_resultStandardScheme getScheme() { + return new GetCatalogs_resultStandardScheme(); } } - private static class ExecuteStatement_resultStandardScheme extends StandardScheme { + private static class GetCatalogs_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4455,7 +7179,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_re switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TExecuteStatementResp(); + struct.success = new TGetCatalogsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -4471,7 +7195,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_re struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4486,16 +7210,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ExecuteStatement_r } - private static class ExecuteStatement_resultTupleSchemeFactory implements SchemeFactory { - public ExecuteStatement_resultTupleScheme getScheme() { - return new ExecuteStatement_resultTupleScheme(); + private static class GetCatalogs_resultTupleSchemeFactory implements SchemeFactory { + public GetCatalogs_resultTupleScheme getScheme() { + return new GetCatalogs_resultTupleScheme(); } } - private static class ExecuteStatement_resultTupleScheme extends TupleScheme { + private static class GetCatalogs_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -4508,11 +7232,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_re } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TExecuteStatementResp(); + struct.success = new TGetCatalogsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -4521,18 +7245,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_res } - public static class GetTypeInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_args"); + public static class GetSchemas_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_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 GetTypeInfo_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTypeInfo_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetSchemas_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetSchemas_argsTupleSchemeFactory()); } - private TGetTypeInfoReq req; // required + private TGetSchemasReq 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 { @@ -4597,16 +7321,16 @@ public String getFieldName() { 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, TGetTypeInfoReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetSchemasReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTypeInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetSchemas_args.class, metaDataMap); } - public GetTypeInfo_args() { + public GetSchemas_args() { } - public GetTypeInfo_args( - TGetTypeInfoReq req) + public GetSchemas_args( + TGetSchemasReq req) { this(); this.req = req; @@ -4615,14 +7339,14 @@ public GetTypeInfo_args( /** * Performs a deep copy on other. */ - public GetTypeInfo_args(GetTypeInfo_args other) { + public GetSchemas_args(GetSchemas_args other) { if (other.isSetReq()) { - this.req = new TGetTypeInfoReq(other.req); + this.req = new TGetSchemasReq(other.req); } } - public GetTypeInfo_args deepCopy() { - return new GetTypeInfo_args(this); + public GetSchemas_args deepCopy() { + return new GetSchemas_args(this); } @Override @@ -4630,11 +7354,11 @@ public void clear() { this.req = null; } - public TGetTypeInfoReq getReq() { + public TGetSchemasReq getReq() { return this.req; } - public void setReq(TGetTypeInfoReq req) { + public void setReq(TGetSchemasReq req) { this.req = req; } @@ -4659,7 +7383,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetTypeInfoReq)value); + setReq((TGetSchemasReq)value); } break; @@ -4692,12 +7416,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetTypeInfo_args) - return this.equals((GetTypeInfo_args)that); + if (that instanceof GetSchemas_args) + return this.equals((GetSchemas_args)that); return false; } - public boolean equals(GetTypeInfo_args that) { + public boolean equals(GetSchemas_args that) { if (that == null) return false; @@ -4715,30 +7439,30 @@ public boolean equals(GetTypeInfo_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTypeInfo_args other) { + @Override + public int compareTo(GetSchemas_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTypeInfo_args typedOther = (GetTypeInfo_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -4760,7 +7484,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTypeInfo_args("); + StringBuilder sb = new StringBuilder("GetSchemas_args("); boolean first = true; sb.append("req:"); @@ -4798,15 +7522,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTypeInfo_argsStandardSchemeFactory implements SchemeFactory { - public GetTypeInfo_argsStandardScheme getScheme() { - return new GetTypeInfo_argsStandardScheme(); + private static class GetSchemas_argsStandardSchemeFactory implements SchemeFactory { + public GetSchemas_argsStandardScheme getScheme() { + return new GetSchemas_argsStandardScheme(); } } - private static class GetTypeInfo_argsStandardScheme extends StandardScheme { + private static class GetSchemas_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -4818,7 +7542,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_args st switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetTypeInfoReq(); + struct.req = new TGetSchemasReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -4834,7 +7558,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4849,16 +7573,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_args s } - private static class GetTypeInfo_argsTupleSchemeFactory implements SchemeFactory { - public GetTypeInfo_argsTupleScheme getScheme() { - return new GetTypeInfo_argsTupleScheme(); + private static class GetSchemas_argsTupleSchemeFactory implements SchemeFactory { + public GetSchemas_argsTupleScheme getScheme() { + return new GetSchemas_argsTupleScheme(); } } - private static class GetTypeInfo_argsTupleScheme extends TupleScheme { + private static class GetSchemas_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -4871,11 +7595,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args st } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetTypeInfoReq(); + struct.req = new TGetSchemasReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -4884,18 +7608,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args str } - public static class GetTypeInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_result"); + public static class GetSchemas_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_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 GetTypeInfo_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTypeInfo_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetSchemas_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetSchemas_resultTupleSchemeFactory()); } - private TGetTypeInfoResp success; // required + private TGetSchemasResp 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 { @@ -4960,16 +7684,16 @@ public String getFieldName() { 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, TGetTypeInfoResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetSchemasResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTypeInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetSchemas_result.class, metaDataMap); } - public GetTypeInfo_result() { + public GetSchemas_result() { } - public GetTypeInfo_result( - TGetTypeInfoResp success) + public GetSchemas_result( + TGetSchemasResp success) { this(); this.success = success; @@ -4978,14 +7702,14 @@ public GetTypeInfo_result( /** * Performs a deep copy on other. */ - public GetTypeInfo_result(GetTypeInfo_result other) { + public GetSchemas_result(GetSchemas_result other) { if (other.isSetSuccess()) { - this.success = new TGetTypeInfoResp(other.success); + this.success = new TGetSchemasResp(other.success); } } - public GetTypeInfo_result deepCopy() { - return new GetTypeInfo_result(this); + public GetSchemas_result deepCopy() { + return new GetSchemas_result(this); } @Override @@ -4993,11 +7717,11 @@ public void clear() { this.success = null; } - public TGetTypeInfoResp getSuccess() { + public TGetSchemasResp getSuccess() { return this.success; } - public void setSuccess(TGetTypeInfoResp success) { + public void setSuccess(TGetSchemasResp success) { this.success = success; } @@ -5022,7 +7746,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetTypeInfoResp)value); + setSuccess((TGetSchemasResp)value); } break; @@ -5054,13 +7778,13 @@ public boolean isSet(_Fields field) { @Override public boolean equals(Object that) { if (that == null) - return false; - if (that instanceof GetTypeInfo_result) - return this.equals((GetTypeInfo_result)that); + return false; + if (that instanceof GetSchemas_result) + return this.equals((GetSchemas_result)that); return false; } - public boolean equals(GetTypeInfo_result that) { + public boolean equals(GetSchemas_result that) { if (that == null) return false; @@ -5078,30 +7802,30 @@ public boolean equals(GetTypeInfo_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTypeInfo_result other) { + @Override + public int compareTo(GetSchemas_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTypeInfo_result typedOther = (GetTypeInfo_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -5123,7 +7847,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTypeInfo_result("); + StringBuilder sb = new StringBuilder("GetSchemas_result("); boolean first = true; sb.append("success:"); @@ -5161,15 +7885,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTypeInfo_resultStandardSchemeFactory implements SchemeFactory { - public GetTypeInfo_resultStandardScheme getScheme() { - return new GetTypeInfo_resultStandardScheme(); + private static class GetSchemas_resultStandardSchemeFactory implements SchemeFactory { + public GetSchemas_resultStandardScheme getScheme() { + return new GetSchemas_resultStandardScheme(); } } - private static class GetTypeInfo_resultStandardScheme extends StandardScheme { + private static class GetSchemas_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5181,7 +7905,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_result switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetTypeInfoResp(); + struct.success = new TGetSchemasResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -5197,7 +7921,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -5212,16 +7936,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTypeInfo_result } - private static class GetTypeInfo_resultTupleSchemeFactory implements SchemeFactory { - public GetTypeInfo_resultTupleScheme getScheme() { - return new GetTypeInfo_resultTupleScheme(); + private static class GetSchemas_resultTupleSchemeFactory implements SchemeFactory { + public GetSchemas_resultTupleScheme getScheme() { + return new GetSchemas_resultTupleScheme(); } } - private static class GetTypeInfo_resultTupleScheme extends TupleScheme { + private static class GetSchemas_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -5234,11 +7958,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetTypeInfoResp(); + struct.success = new TGetSchemasResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -5247,18 +7971,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result s } - public static class GetCatalogs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_args"); + public static class GetTables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_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 GetCatalogs_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetCatalogs_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetTables_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTables_argsTupleSchemeFactory()); } - private TGetCatalogsReq req; // required + private TGetTablesReq 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 { @@ -5323,16 +8047,16 @@ public String getFieldName() { 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, TGetCatalogsReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTablesReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCatalogs_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTables_args.class, metaDataMap); } - public GetCatalogs_args() { + public GetTables_args() { } - public GetCatalogs_args( - TGetCatalogsReq req) + public GetTables_args( + TGetTablesReq req) { this(); this.req = req; @@ -5341,14 +8065,14 @@ public GetCatalogs_args( /** * Performs a deep copy on other. */ - public GetCatalogs_args(GetCatalogs_args other) { + public GetTables_args(GetTables_args other) { if (other.isSetReq()) { - this.req = new TGetCatalogsReq(other.req); + this.req = new TGetTablesReq(other.req); } } - public GetCatalogs_args deepCopy() { - return new GetCatalogs_args(this); + public GetTables_args deepCopy() { + return new GetTables_args(this); } @Override @@ -5356,11 +8080,11 @@ public void clear() { this.req = null; } - public TGetCatalogsReq getReq() { + public TGetTablesReq getReq() { return this.req; } - public void setReq(TGetCatalogsReq req) { + public void setReq(TGetTablesReq req) { this.req = req; } @@ -5385,7 +8109,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetCatalogsReq)value); + setReq((TGetTablesReq)value); } break; @@ -5418,12 +8142,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetCatalogs_args) - return this.equals((GetCatalogs_args)that); + if (that instanceof GetTables_args) + return this.equals((GetTables_args)that); return false; } - public boolean equals(GetCatalogs_args that) { + public boolean equals(GetTables_args that) { if (that == null) return false; @@ -5441,30 +8165,30 @@ public boolean equals(GetCatalogs_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetCatalogs_args other) { + @Override + public int compareTo(GetTables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetCatalogs_args typedOther = (GetCatalogs_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -5486,7 +8210,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetCatalogs_args("); + StringBuilder sb = new StringBuilder("GetTables_args("); boolean first = true; sb.append("req:"); @@ -5524,15 +8248,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetCatalogs_argsStandardSchemeFactory implements SchemeFactory { - public GetCatalogs_argsStandardScheme getScheme() { - return new GetCatalogs_argsStandardScheme(); + private static class GetTables_argsStandardSchemeFactory implements SchemeFactory { + public GetTables_argsStandardScheme getScheme() { + return new GetTables_argsStandardScheme(); } } - private static class GetCatalogs_argsStandardScheme extends StandardScheme { + private static class GetTables_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5544,7 +8268,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_args st switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetCatalogsReq(); + struct.req = new TGetTablesReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -5560,7 +8284,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_args st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -5575,16 +8299,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_args s } - private static class GetCatalogs_argsTupleSchemeFactory implements SchemeFactory { - public GetCatalogs_argsTupleScheme getScheme() { - return new GetCatalogs_argsTupleScheme(); + private static class GetTables_argsTupleSchemeFactory implements SchemeFactory { + public GetTables_argsTupleScheme getScheme() { + return new GetTables_argsTupleScheme(); } } - private static class GetCatalogs_argsTupleScheme extends TupleScheme { + private static class GetTables_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -5597,11 +8321,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args st } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetCatalogsReq(); + struct.req = new TGetTablesReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -5610,18 +8334,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args str } - public static class GetCatalogs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_result"); + public static class GetTables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_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 GetCatalogs_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetCatalogs_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetTables_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTables_resultTupleSchemeFactory()); } - private TGetCatalogsResp success; // required + private TGetTablesResp 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 { @@ -5686,16 +8410,16 @@ public String getFieldName() { 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, TGetCatalogsResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTablesResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCatalogs_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTables_result.class, metaDataMap); } - public GetCatalogs_result() { + public GetTables_result() { } - public GetCatalogs_result( - TGetCatalogsResp success) + public GetTables_result( + TGetTablesResp success) { this(); this.success = success; @@ -5704,14 +8428,14 @@ public GetCatalogs_result( /** * Performs a deep copy on other. */ - public GetCatalogs_result(GetCatalogs_result other) { + public GetTables_result(GetTables_result other) { if (other.isSetSuccess()) { - this.success = new TGetCatalogsResp(other.success); + this.success = new TGetTablesResp(other.success); } } - public GetCatalogs_result deepCopy() { - return new GetCatalogs_result(this); + public GetTables_result deepCopy() { + return new GetTables_result(this); } @Override @@ -5719,11 +8443,11 @@ public void clear() { this.success = null; } - public TGetCatalogsResp getSuccess() { + public TGetTablesResp getSuccess() { return this.success; } - public void setSuccess(TGetCatalogsResp success) { + public void setSuccess(TGetTablesResp success) { this.success = success; } @@ -5748,7 +8472,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetCatalogsResp)value); + setSuccess((TGetTablesResp)value); } break; @@ -5781,12 +8505,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetCatalogs_result) - return this.equals((GetCatalogs_result)that); + if (that instanceof GetTables_result) + return this.equals((GetTables_result)that); return false; } - public boolean equals(GetCatalogs_result that) { + public boolean equals(GetTables_result that) { if (that == null) return false; @@ -5804,30 +8528,30 @@ public boolean equals(GetCatalogs_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetCatalogs_result other) { + @Override + public int compareTo(GetTables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetCatalogs_result typedOther = (GetCatalogs_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -5849,7 +8573,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetCatalogs_result("); + StringBuilder sb = new StringBuilder("GetTables_result("); boolean first = true; sb.append("success:"); @@ -5887,15 +8611,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetCatalogs_resultStandardSchemeFactory implements SchemeFactory { - public GetCatalogs_resultStandardScheme getScheme() { - return new GetCatalogs_resultStandardScheme(); + private static class GetTables_resultStandardSchemeFactory implements SchemeFactory { + public GetTables_resultStandardScheme getScheme() { + return new GetTables_resultStandardScheme(); } } - private static class GetCatalogs_resultStandardScheme extends StandardScheme { + private static class GetTables_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -5907,7 +8631,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_result switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetCatalogsResp(); + struct.success = new TGetTablesResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -5923,7 +8647,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -5938,16 +8662,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetCatalogs_result } - private static class GetCatalogs_resultTupleSchemeFactory implements SchemeFactory { - public GetCatalogs_resultTupleScheme getScheme() { - return new GetCatalogs_resultTupleScheme(); + private static class GetTables_resultTupleSchemeFactory implements SchemeFactory { + public GetTables_resultTupleScheme getScheme() { + return new GetTables_resultTupleScheme(); } } - private static class GetCatalogs_resultTupleScheme extends TupleScheme { + private static class GetTables_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -5960,11 +8684,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetCatalogsResp(); + struct.success = new TGetTablesResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -5973,18 +8697,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result s } - public static class GetSchemas_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_args"); + public static class GetTableTypes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_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 GetSchemas_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetSchemas_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetTableTypes_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTableTypes_argsTupleSchemeFactory()); } - private TGetSchemasReq req; // required + private TGetTableTypesReq 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 { @@ -6049,16 +8773,16 @@ public String getFieldName() { 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, TGetSchemasReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTableTypesReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetSchemas_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableTypes_args.class, metaDataMap); } - public GetSchemas_args() { + public GetTableTypes_args() { } - public GetSchemas_args( - TGetSchemasReq req) + public GetTableTypes_args( + TGetTableTypesReq req) { this(); this.req = req; @@ -6067,14 +8791,14 @@ public GetSchemas_args( /** * Performs a deep copy on other. */ - public GetSchemas_args(GetSchemas_args other) { + public GetTableTypes_args(GetTableTypes_args other) { if (other.isSetReq()) { - this.req = new TGetSchemasReq(other.req); + this.req = new TGetTableTypesReq(other.req); } } - public GetSchemas_args deepCopy() { - return new GetSchemas_args(this); + public GetTableTypes_args deepCopy() { + return new GetTableTypes_args(this); } @Override @@ -6082,11 +8806,11 @@ public void clear() { this.req = null; } - public TGetSchemasReq getReq() { + public TGetTableTypesReq getReq() { return this.req; } - public void setReq(TGetSchemasReq req) { + public void setReq(TGetTableTypesReq req) { this.req = req; } @@ -6111,7 +8835,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetSchemasReq)value); + setReq((TGetTableTypesReq)value); } break; @@ -6144,12 +8868,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetSchemas_args) - return this.equals((GetSchemas_args)that); + if (that instanceof GetTableTypes_args) + return this.equals((GetTableTypes_args)that); return false; } - public boolean equals(GetSchemas_args that) { + public boolean equals(GetTableTypes_args that) { if (that == null) return false; @@ -6167,30 +8891,30 @@ public boolean equals(GetSchemas_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetSchemas_args other) { + @Override + public int compareTo(GetTableTypes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetSchemas_args typedOther = (GetSchemas_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -6212,7 +8936,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetSchemas_args("); + StringBuilder sb = new StringBuilder("GetTableTypes_args("); boolean first = true; sb.append("req:"); @@ -6250,15 +8974,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetSchemas_argsStandardSchemeFactory implements SchemeFactory { - public GetSchemas_argsStandardScheme getScheme() { - return new GetSchemas_argsStandardScheme(); + private static class GetTableTypes_argsStandardSchemeFactory implements SchemeFactory { + public GetTableTypes_argsStandardScheme getScheme() { + return new GetTableTypes_argsStandardScheme(); } } - private static class GetSchemas_argsStandardScheme extends StandardScheme { + private static class GetTableTypes_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6270,7 +8994,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_args str switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetSchemasReq(); + struct.req = new TGetTableTypesReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -6286,7 +9010,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -6301,16 +9025,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_args st } - private static class GetSchemas_argsTupleSchemeFactory implements SchemeFactory { - public GetSchemas_argsTupleScheme getScheme() { - return new GetSchemas_argsTupleScheme(); + private static class GetTableTypes_argsTupleSchemeFactory implements SchemeFactory { + public GetTableTypes_argsTupleScheme getScheme() { + return new GetTableTypes_argsTupleScheme(); } } - private static class GetSchemas_argsTupleScheme extends TupleScheme { + private static class GetTableTypes_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -6323,11 +9047,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args str } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetSchemasReq(); + struct.req = new TGetTableTypesReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -6336,18 +9060,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args stru } - public static class GetSchemas_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_result"); + public static class GetTableTypes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_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 GetSchemas_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetSchemas_resultTupleSchemeFactory()); + static { + schemes.put(StandardScheme.class, new GetTableTypes_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetTableTypes_resultTupleSchemeFactory()); } - private TGetSchemasResp success; // required + private TGetTableTypesResp 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 { @@ -6412,16 +9136,16 @@ public String getFieldName() { 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, TGetSchemasResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetTableTypesResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetSchemas_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableTypes_result.class, metaDataMap); } - public GetSchemas_result() { + public GetTableTypes_result() { } - public GetSchemas_result( - TGetSchemasResp success) + public GetTableTypes_result( + TGetTableTypesResp success) { this(); this.success = success; @@ -6430,14 +9154,14 @@ public GetSchemas_result( /** * Performs a deep copy on other. */ - public GetSchemas_result(GetSchemas_result other) { + public GetTableTypes_result(GetTableTypes_result other) { if (other.isSetSuccess()) { - this.success = new TGetSchemasResp(other.success); + this.success = new TGetTableTypesResp(other.success); } } - public GetSchemas_result deepCopy() { - return new GetSchemas_result(this); + public GetTableTypes_result deepCopy() { + return new GetTableTypes_result(this); } @Override @@ -6445,11 +9169,11 @@ public void clear() { this.success = null; } - public TGetSchemasResp getSuccess() { + public TGetTableTypesResp getSuccess() { return this.success; } - public void setSuccess(TGetSchemasResp success) { + public void setSuccess(TGetTableTypesResp success) { this.success = success; } @@ -6474,7 +9198,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetSchemasResp)value); + setSuccess((TGetTableTypesResp)value); } break; @@ -6507,12 +9231,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetSchemas_result) - return this.equals((GetSchemas_result)that); + if (that instanceof GetTableTypes_result) + return this.equals((GetTableTypes_result)that); return false; } - public boolean equals(GetSchemas_result that) { + public boolean equals(GetTableTypes_result that) { if (that == null) return false; @@ -6530,30 +9254,30 @@ public boolean equals(GetSchemas_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetSchemas_result other) { + @Override + public int compareTo(GetTableTypes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetSchemas_result typedOther = (GetSchemas_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -6575,7 +9299,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetSchemas_result("); + StringBuilder sb = new StringBuilder("GetTableTypes_result("); boolean first = true; sb.append("success:"); @@ -6613,15 +9337,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetSchemas_resultStandardSchemeFactory implements SchemeFactory { - public GetSchemas_resultStandardScheme getScheme() { - return new GetSchemas_resultStandardScheme(); + private static class GetTableTypes_resultStandardSchemeFactory implements SchemeFactory { + public GetTableTypes_resultStandardScheme getScheme() { + return new GetTableTypes_resultStandardScheme(); } } - private static class GetSchemas_resultStandardScheme extends StandardScheme { + private static class GetTableTypes_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6633,7 +9357,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_result s switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetSchemasResp(); + struct.success = new TGetTableTypesResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -6649,7 +9373,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -6664,16 +9388,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetSchemas_result } - private static class GetSchemas_resultTupleSchemeFactory implements SchemeFactory { - public GetSchemas_resultTupleScheme getScheme() { - return new GetSchemas_resultTupleScheme(); + private static class GetTableTypes_resultTupleSchemeFactory implements SchemeFactory { + public GetTableTypes_resultTupleScheme getScheme() { + return new GetTableTypes_resultTupleScheme(); } } - private static class GetSchemas_resultTupleScheme extends TupleScheme { + private static class GetTableTypes_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -6686,11 +9410,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result s } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetSchemasResp(); + struct.success = new TGetTableTypesResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -6699,18 +9423,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result st } - public static class GetTables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_args"); + public static class GetColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_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 GetTables_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTables_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetColumns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetColumns_argsTupleSchemeFactory()); } - private TGetTablesReq req; // required + private TGetColumnsReq 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 { @@ -6775,16 +9499,16 @@ public String getFieldName() { 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, TGetTablesReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetColumnsReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTables_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetColumns_args.class, metaDataMap); } - public GetTables_args() { + public GetColumns_args() { } - public GetTables_args( - TGetTablesReq req) + public GetColumns_args( + TGetColumnsReq req) { this(); this.req = req; @@ -6793,14 +9517,14 @@ public GetTables_args( /** * Performs a deep copy on other. */ - public GetTables_args(GetTables_args other) { + public GetColumns_args(GetColumns_args other) { if (other.isSetReq()) { - this.req = new TGetTablesReq(other.req); + this.req = new TGetColumnsReq(other.req); } } - public GetTables_args deepCopy() { - return new GetTables_args(this); + public GetColumns_args deepCopy() { + return new GetColumns_args(this); } @Override @@ -6808,11 +9532,11 @@ public void clear() { this.req = null; } - public TGetTablesReq getReq() { + public TGetColumnsReq getReq() { return this.req; } - public void setReq(TGetTablesReq req) { + public void setReq(TGetColumnsReq req) { this.req = req; } @@ -6837,7 +9561,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetTablesReq)value); + setReq((TGetColumnsReq)value); } break; @@ -6870,12 +9594,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetTables_args) - return this.equals((GetTables_args)that); + if (that instanceof GetColumns_args) + return this.equals((GetColumns_args)that); return false; } - public boolean equals(GetTables_args that) { + public boolean equals(GetColumns_args that) { if (that == null) return false; @@ -6893,30 +9617,30 @@ public boolean equals(GetTables_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTables_args other) { + @Override + public int compareTo(GetColumns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTables_args typedOther = (GetTables_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -6938,7 +9662,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTables_args("); + StringBuilder sb = new StringBuilder("GetColumns_args("); boolean first = true; sb.append("req:"); @@ -6976,15 +9700,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTables_argsStandardSchemeFactory implements SchemeFactory { - public GetTables_argsStandardScheme getScheme() { - return new GetTables_argsStandardScheme(); + private static class GetColumns_argsStandardSchemeFactory implements SchemeFactory { + public GetColumns_argsStandardScheme getScheme() { + return new GetColumns_argsStandardScheme(); } } - private static class GetTables_argsStandardScheme extends StandardScheme { + private static class GetColumns_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -6996,7 +9720,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_args stru switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetTablesReq(); + struct.req = new TGetColumnsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -7012,7 +9736,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_args stru struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -7027,16 +9751,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_args str } - private static class GetTables_argsTupleSchemeFactory implements SchemeFactory { - public GetTables_argsTupleScheme getScheme() { - return new GetTables_argsTupleScheme(); + private static class GetColumns_argsTupleSchemeFactory implements SchemeFactory { + public GetColumns_argsTupleScheme getScheme() { + return new GetColumns_argsTupleScheme(); } } - private static class GetTables_argsTupleScheme extends TupleScheme { + private static class GetColumns_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -7049,11 +9773,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_args stru } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetTablesReq(); + struct.req = new TGetColumnsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -7062,18 +9786,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_args struc } - public static class GetTables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_result"); + public static class GetColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_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 GetTables_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTables_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetColumns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetColumns_resultTupleSchemeFactory()); } - private TGetTablesResp success; // required + private TGetColumnsResp 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 { @@ -7138,16 +9862,16 @@ public String getFieldName() { 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, TGetTablesResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetColumnsResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTables_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetColumns_result.class, metaDataMap); } - public GetTables_result() { + public GetColumns_result() { } - public GetTables_result( - TGetTablesResp success) + public GetColumns_result( + TGetColumnsResp success) { this(); this.success = success; @@ -7156,14 +9880,14 @@ public GetTables_result( /** * Performs a deep copy on other. */ - public GetTables_result(GetTables_result other) { + public GetColumns_result(GetColumns_result other) { if (other.isSetSuccess()) { - this.success = new TGetTablesResp(other.success); + this.success = new TGetColumnsResp(other.success); } } - public GetTables_result deepCopy() { - return new GetTables_result(this); + public GetColumns_result deepCopy() { + return new GetColumns_result(this); } @Override @@ -7171,11 +9895,11 @@ public void clear() { this.success = null; } - public TGetTablesResp getSuccess() { + public TGetColumnsResp getSuccess() { return this.success; } - public void setSuccess(TGetTablesResp success) { + public void setSuccess(TGetColumnsResp success) { this.success = success; } @@ -7200,7 +9924,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetTablesResp)value); + setSuccess((TGetColumnsResp)value); } break; @@ -7233,12 +9957,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetTables_result) - return this.equals((GetTables_result)that); + if (that instanceof GetColumns_result) + return this.equals((GetColumns_result)that); return false; } - public boolean equals(GetTables_result that) { + public boolean equals(GetColumns_result that) { if (that == null) return false; @@ -7256,30 +9980,30 @@ public boolean equals(GetTables_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTables_result other) { + @Override + public int compareTo(GetColumns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTables_result typedOther = (GetTables_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -7301,7 +10025,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTables_result("); + StringBuilder sb = new StringBuilder("GetColumns_result("); boolean first = true; sb.append("success:"); @@ -7339,15 +10063,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTables_resultStandardSchemeFactory implements SchemeFactory { - public GetTables_resultStandardScheme getScheme() { - return new GetTables_resultStandardScheme(); + private static class GetColumns_resultStandardSchemeFactory implements SchemeFactory { + public GetColumns_resultStandardScheme getScheme() { + return new GetColumns_resultStandardScheme(); } } - private static class GetTables_resultStandardScheme extends StandardScheme { + private static class GetColumns_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7359,7 +10083,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_result st switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetTablesResp(); + struct.success = new TGetColumnsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -7375,7 +10099,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_result st struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -7390,16 +10114,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTables_result s } - private static class GetTables_resultTupleSchemeFactory implements SchemeFactory { - public GetTables_resultTupleScheme getScheme() { - return new GetTables_resultTupleScheme(); + private static class GetColumns_resultTupleSchemeFactory implements SchemeFactory { + public GetColumns_resultTupleScheme getScheme() { + return new GetColumns_resultTupleScheme(); } } - private static class GetTables_resultTupleScheme extends TupleScheme { + private static class GetColumns_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -7412,11 +10136,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTables_result st } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetTablesResp(); + struct.success = new TGetColumnsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -7425,18 +10149,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_result str } - public static class GetTableTypes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_args"); + public static class GetFunctions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_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 GetTableTypes_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTableTypes_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetFunctions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFunctions_argsTupleSchemeFactory()); } - private TGetTableTypesReq req; // required + private TGetFunctionsReq 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 { @@ -7501,16 +10225,16 @@ public String getFieldName() { 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, TGetTableTypesReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetFunctionsReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableTypes_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFunctions_args.class, metaDataMap); } - public GetTableTypes_args() { + public GetFunctions_args() { } - public GetTableTypes_args( - TGetTableTypesReq req) + public GetFunctions_args( + TGetFunctionsReq req) { this(); this.req = req; @@ -7519,14 +10243,14 @@ public GetTableTypes_args( /** * Performs a deep copy on other. */ - public GetTableTypes_args(GetTableTypes_args other) { + public GetFunctions_args(GetFunctions_args other) { if (other.isSetReq()) { - this.req = new TGetTableTypesReq(other.req); + this.req = new TGetFunctionsReq(other.req); } } - public GetTableTypes_args deepCopy() { - return new GetTableTypes_args(this); + public GetFunctions_args deepCopy() { + return new GetFunctions_args(this); } @Override @@ -7534,11 +10258,11 @@ public void clear() { this.req = null; } - public TGetTableTypesReq getReq() { + public TGetFunctionsReq getReq() { return this.req; } - public void setReq(TGetTableTypesReq req) { + public void setReq(TGetFunctionsReq req) { this.req = req; } @@ -7563,7 +10287,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetTableTypesReq)value); + setReq((TGetFunctionsReq)value); } break; @@ -7596,12 +10320,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetTableTypes_args) - return this.equals((GetTableTypes_args)that); + if (that instanceof GetFunctions_args) + return this.equals((GetFunctions_args)that); return false; } - public boolean equals(GetTableTypes_args that) { + public boolean equals(GetFunctions_args that) { if (that == null) return false; @@ -7619,30 +10343,30 @@ public boolean equals(GetTableTypes_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTableTypes_args other) { + @Override + public int compareTo(GetFunctions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTableTypes_args typedOther = (GetTableTypes_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -7664,7 +10388,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTableTypes_args("); + StringBuilder sb = new StringBuilder("GetFunctions_args("); boolean first = true; sb.append("req:"); @@ -7702,15 +10426,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTableTypes_argsStandardSchemeFactory implements SchemeFactory { - public GetTableTypes_argsStandardScheme getScheme() { - return new GetTableTypes_argsStandardScheme(); + private static class GetFunctions_argsStandardSchemeFactory implements SchemeFactory { + public GetFunctions_argsStandardScheme getScheme() { + return new GetFunctions_argsStandardScheme(); } } - private static class GetTableTypes_argsStandardScheme extends StandardScheme { + private static class GetFunctions_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -7722,7 +10446,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_args switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetTableTypesReq(); + struct.req = new TGetFunctionsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -7738,7 +10462,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_args struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -7753,16 +10477,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_args } - private static class GetTableTypes_argsTupleSchemeFactory implements SchemeFactory { - public GetTableTypes_argsTupleScheme getScheme() { - return new GetTableTypes_argsTupleScheme(); + private static class GetFunctions_argsTupleSchemeFactory implements SchemeFactory { + public GetFunctions_argsTupleScheme getScheme() { + return new GetFunctions_argsTupleScheme(); } } - private static class GetTableTypes_argsTupleScheme extends TupleScheme { + private static class GetFunctions_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -7775,11 +10499,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetTableTypesReq(); + struct.req = new TGetFunctionsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -7788,18 +10512,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args s } - public static class GetTableTypes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_result"); + public static class GetFunctions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_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 GetTableTypes_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetTableTypes_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetFunctions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetFunctions_resultTupleSchemeFactory()); } - private TGetTableTypesResp success; // required + private TGetFunctionsResp 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 { @@ -7864,16 +10588,16 @@ public String getFieldName() { 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, TGetTableTypesResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetFunctionsResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetTableTypes_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFunctions_result.class, metaDataMap); } - public GetTableTypes_result() { + public GetFunctions_result() { } - public GetTableTypes_result( - TGetTableTypesResp success) + public GetFunctions_result( + TGetFunctionsResp success) { this(); this.success = success; @@ -7882,14 +10606,14 @@ public GetTableTypes_result( /** * Performs a deep copy on other. */ - public GetTableTypes_result(GetTableTypes_result other) { + public GetFunctions_result(GetFunctions_result other) { if (other.isSetSuccess()) { - this.success = new TGetTableTypesResp(other.success); + this.success = new TGetFunctionsResp(other.success); } } - public GetTableTypes_result deepCopy() { - return new GetTableTypes_result(this); + public GetFunctions_result deepCopy() { + return new GetFunctions_result(this); } @Override @@ -7897,11 +10621,11 @@ public void clear() { this.success = null; } - public TGetTableTypesResp getSuccess() { + public TGetFunctionsResp getSuccess() { return this.success; } - public void setSuccess(TGetTableTypesResp success) { + public void setSuccess(TGetFunctionsResp success) { this.success = success; } @@ -7926,7 +10650,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetTableTypesResp)value); + setSuccess((TGetFunctionsResp)value); } break; @@ -7959,12 +10683,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetTableTypes_result) - return this.equals((GetTableTypes_result)that); + if (that instanceof GetFunctions_result) + return this.equals((GetFunctions_result)that); return false; } - public boolean equals(GetTableTypes_result that) { + public boolean equals(GetFunctions_result that) { if (that == null) return false; @@ -7982,30 +10706,30 @@ public boolean equals(GetTableTypes_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetTableTypes_result other) { + @Override + public int compareTo(GetFunctions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetTableTypes_result typedOther = (GetTableTypes_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -8027,7 +10751,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetTableTypes_result("); + StringBuilder sb = new StringBuilder("GetFunctions_result("); boolean first = true; sb.append("success:"); @@ -8065,15 +10789,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetTableTypes_resultStandardSchemeFactory implements SchemeFactory { - public GetTableTypes_resultStandardScheme getScheme() { - return new GetTableTypes_resultStandardScheme(); + private static class GetFunctions_resultStandardSchemeFactory implements SchemeFactory { + public GetFunctions_resultStandardScheme getScheme() { + return new GetFunctions_resultStandardScheme(); } } - private static class GetTableTypes_resultStandardScheme extends StandardScheme { + private static class GetFunctions_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8085,7 +10809,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_resul switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetTableTypesResp(); + struct.success = new TGetFunctionsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -8101,7 +10825,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_resul struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -8116,16 +10840,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetTableTypes_resu } - private static class GetTableTypes_resultTupleSchemeFactory implements SchemeFactory { - public GetTableTypes_resultTupleScheme getScheme() { - return new GetTableTypes_resultTupleScheme(); + private static class GetFunctions_resultTupleSchemeFactory implements SchemeFactory { + public GetFunctions_resultTupleScheme getScheme() { + return new GetFunctions_resultTupleScheme(); } } - private static class GetTableTypes_resultTupleScheme extends TupleScheme { + private static class GetFunctions_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -8138,11 +10862,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_resul } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetTableTypesResp(); + struct.success = new TGetFunctionsResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -8151,18 +10875,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result } - public static class GetColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_args"); + public static class GetPrimaryKeys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrimaryKeys_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 GetColumns_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetColumns_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetPrimaryKeys_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetPrimaryKeys_argsTupleSchemeFactory()); } - private TGetColumnsReq req; // required + private TGetPrimaryKeysReq 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 { @@ -8227,16 +10951,16 @@ public String getFieldName() { 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, TGetColumnsReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetPrimaryKeysReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetColumns_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrimaryKeys_args.class, metaDataMap); } - public GetColumns_args() { + public GetPrimaryKeys_args() { } - public GetColumns_args( - TGetColumnsReq req) + public GetPrimaryKeys_args( + TGetPrimaryKeysReq req) { this(); this.req = req; @@ -8245,14 +10969,14 @@ public GetColumns_args( /** * Performs a deep copy on other. */ - public GetColumns_args(GetColumns_args other) { + public GetPrimaryKeys_args(GetPrimaryKeys_args other) { if (other.isSetReq()) { - this.req = new TGetColumnsReq(other.req); + this.req = new TGetPrimaryKeysReq(other.req); } } - public GetColumns_args deepCopy() { - return new GetColumns_args(this); + public GetPrimaryKeys_args deepCopy() { + return new GetPrimaryKeys_args(this); } @Override @@ -8260,11 +10984,11 @@ public void clear() { this.req = null; } - public TGetColumnsReq getReq() { + public TGetPrimaryKeysReq getReq() { return this.req; } - public void setReq(TGetColumnsReq req) { + public void setReq(TGetPrimaryKeysReq req) { this.req = req; } @@ -8289,7 +11013,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetColumnsReq)value); + setReq((TGetPrimaryKeysReq)value); } break; @@ -8322,12 +11046,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetColumns_args) - return this.equals((GetColumns_args)that); + if (that instanceof GetPrimaryKeys_args) + return this.equals((GetPrimaryKeys_args)that); return false; } - public boolean equals(GetColumns_args that) { + public boolean equals(GetPrimaryKeys_args that) { if (that == null) return false; @@ -8345,30 +11069,30 @@ public boolean equals(GetColumns_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetColumns_args other) { + @Override + public int compareTo(GetPrimaryKeys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetColumns_args typedOther = (GetColumns_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -8390,7 +11114,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetColumns_args("); + StringBuilder sb = new StringBuilder("GetPrimaryKeys_args("); boolean first = true; sb.append("req:"); @@ -8428,15 +11152,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetColumns_argsStandardSchemeFactory implements SchemeFactory { - public GetColumns_argsStandardScheme getScheme() { - return new GetColumns_argsStandardScheme(); + private static class GetPrimaryKeys_argsStandardSchemeFactory implements SchemeFactory { + public GetPrimaryKeys_argsStandardScheme getScheme() { + return new GetPrimaryKeys_argsStandardScheme(); } } - private static class GetColumns_argsStandardScheme extends StandardScheme { + private static class GetPrimaryKeys_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrimaryKeys_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8448,7 +11172,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_args str switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetColumnsReq(); + struct.req = new TGetPrimaryKeysReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -8464,7 +11188,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_args str struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetPrimaryKeys_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -8479,16 +11203,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_args st } - private static class GetColumns_argsTupleSchemeFactory implements SchemeFactory { - public GetColumns_argsTupleScheme getScheme() { - return new GetColumns_argsTupleScheme(); + private static class GetPrimaryKeys_argsTupleSchemeFactory implements SchemeFactory { + public GetPrimaryKeys_argsTupleScheme getScheme() { + return new GetPrimaryKeys_argsTupleScheme(); } } - private static class GetColumns_argsTupleScheme extends TupleScheme { + private static class GetPrimaryKeys_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -8501,11 +11225,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_args str } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetColumnsReq(); + struct.req = new TGetPrimaryKeysReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -8514,18 +11238,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_args stru } - public static class GetColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_result"); + public static class GetPrimaryKeys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrimaryKeys_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 GetColumns_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetColumns_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetPrimaryKeys_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetPrimaryKeys_resultTupleSchemeFactory()); } - private TGetColumnsResp success; // required + private TGetPrimaryKeysResp 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 { @@ -8590,16 +11314,16 @@ public String getFieldName() { 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, TGetColumnsResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetPrimaryKeysResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetColumns_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrimaryKeys_result.class, metaDataMap); } - public GetColumns_result() { + public GetPrimaryKeys_result() { } - public GetColumns_result( - TGetColumnsResp success) + public GetPrimaryKeys_result( + TGetPrimaryKeysResp success) { this(); this.success = success; @@ -8608,14 +11332,14 @@ public GetColumns_result( /** * Performs a deep copy on other. */ - public GetColumns_result(GetColumns_result other) { + public GetPrimaryKeys_result(GetPrimaryKeys_result other) { if (other.isSetSuccess()) { - this.success = new TGetColumnsResp(other.success); + this.success = new TGetPrimaryKeysResp(other.success); } } - public GetColumns_result deepCopy() { - return new GetColumns_result(this); + public GetPrimaryKeys_result deepCopy() { + return new GetPrimaryKeys_result(this); } @Override @@ -8623,11 +11347,11 @@ public void clear() { this.success = null; } - public TGetColumnsResp getSuccess() { + public TGetPrimaryKeysResp getSuccess() { return this.success; } - public void setSuccess(TGetColumnsResp success) { + public void setSuccess(TGetPrimaryKeysResp success) { this.success = success; } @@ -8652,7 +11376,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetColumnsResp)value); + setSuccess((TGetPrimaryKeysResp)value); } break; @@ -8685,12 +11409,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetColumns_result) - return this.equals((GetColumns_result)that); + if (that instanceof GetPrimaryKeys_result) + return this.equals((GetPrimaryKeys_result)that); return false; } - public boolean equals(GetColumns_result that) { + public boolean equals(GetPrimaryKeys_result that) { if (that == null) return false; @@ -8708,30 +11432,30 @@ public boolean equals(GetColumns_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetColumns_result other) { + @Override + public int compareTo(GetPrimaryKeys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetColumns_result typedOther = (GetColumns_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -8753,7 +11477,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetColumns_result("); + StringBuilder sb = new StringBuilder("GetPrimaryKeys_result("); boolean first = true; sb.append("success:"); @@ -8791,15 +11515,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetColumns_resultStandardSchemeFactory implements SchemeFactory { - public GetColumns_resultStandardScheme getScheme() { - return new GetColumns_resultStandardScheme(); + private static class GetPrimaryKeys_resultStandardSchemeFactory implements SchemeFactory { + public GetPrimaryKeys_resultStandardScheme getScheme() { + return new GetPrimaryKeys_resultStandardScheme(); } } - private static class GetColumns_resultStandardScheme extends StandardScheme { + private static class GetPrimaryKeys_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrimaryKeys_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -8811,7 +11535,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_result s switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetColumnsResp(); + struct.success = new TGetPrimaryKeysResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -8827,7 +11551,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_result s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetPrimaryKeys_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -8842,16 +11566,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetColumns_result } - private static class GetColumns_resultTupleSchemeFactory implements SchemeFactory { - public GetColumns_resultTupleScheme getScheme() { - return new GetColumns_resultTupleScheme(); + private static class GetPrimaryKeys_resultTupleSchemeFactory implements SchemeFactory { + public GetPrimaryKeys_resultTupleScheme getScheme() { + return new GetPrimaryKeys_resultTupleScheme(); } } - private static class GetColumns_resultTupleScheme extends TupleScheme { + private static class GetPrimaryKeys_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -8864,11 +11588,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetColumns_result s } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetColumnsResp(); + struct.success = new TGetPrimaryKeysResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -8877,18 +11601,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_result st } - public static class GetFunctions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_args"); + public static class GetCrossReference_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCrossReference_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 GetFunctions_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFunctions_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetCrossReference_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetCrossReference_argsTupleSchemeFactory()); } - private TGetFunctionsReq req; // required + private TGetCrossReferenceReq 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 { @@ -8953,16 +11677,16 @@ public String getFieldName() { 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, TGetFunctionsReq.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetCrossReferenceReq.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFunctions_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCrossReference_args.class, metaDataMap); } - public GetFunctions_args() { + public GetCrossReference_args() { } - public GetFunctions_args( - TGetFunctionsReq req) + public GetCrossReference_args( + TGetCrossReferenceReq req) { this(); this.req = req; @@ -8971,14 +11695,14 @@ public GetFunctions_args( /** * Performs a deep copy on other. */ - public GetFunctions_args(GetFunctions_args other) { + public GetCrossReference_args(GetCrossReference_args other) { if (other.isSetReq()) { - this.req = new TGetFunctionsReq(other.req); + this.req = new TGetCrossReferenceReq(other.req); } } - public GetFunctions_args deepCopy() { - return new GetFunctions_args(this); + public GetCrossReference_args deepCopy() { + return new GetCrossReference_args(this); } @Override @@ -8986,11 +11710,11 @@ public void clear() { this.req = null; } - public TGetFunctionsReq getReq() { + public TGetCrossReferenceReq getReq() { return this.req; } - public void setReq(TGetFunctionsReq req) { + public void setReq(TGetCrossReferenceReq req) { this.req = req; } @@ -9015,7 +11739,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReq(); } else { - setReq((TGetFunctionsReq)value); + setReq((TGetCrossReferenceReq)value); } break; @@ -9048,12 +11772,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetFunctions_args) - return this.equals((GetFunctions_args)that); + if (that instanceof GetCrossReference_args) + return this.equals((GetCrossReference_args)that); return false; } - public boolean equals(GetFunctions_args that) { + public boolean equals(GetCrossReference_args that) { if (that == null) return false; @@ -9071,30 +11795,30 @@ public boolean equals(GetFunctions_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetFunctions_args other) { + @Override + public int compareTo(GetCrossReference_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetFunctions_args typedOther = (GetFunctions_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -9116,7 +11840,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetFunctions_args("); + StringBuilder sb = new StringBuilder("GetCrossReference_args("); boolean first = true; sb.append("req:"); @@ -9154,15 +11878,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetFunctions_argsStandardSchemeFactory implements SchemeFactory { - public GetFunctions_argsStandardScheme getScheme() { - return new GetFunctions_argsStandardScheme(); + private static class GetCrossReference_argsStandardSchemeFactory implements SchemeFactory { + public GetCrossReference_argsStandardScheme getScheme() { + return new GetCrossReference_argsStandardScheme(); } } - private static class GetFunctions_argsStandardScheme extends StandardScheme { + private static class GetCrossReference_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetCrossReference_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9174,7 +11898,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_args s switch (schemeField.id) { case 1: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.req = new TGetFunctionsReq(); + struct.req = new TGetCrossReferenceReq(); struct.req.read(iprot); struct.setReqIsSet(true); } else { @@ -9190,7 +11914,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_args s struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetCrossReference_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -9205,16 +11929,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_args } - private static class GetFunctions_argsTupleSchemeFactory implements SchemeFactory { - public GetFunctions_argsTupleScheme getScheme() { - return new GetFunctions_argsTupleScheme(); + private static class GetCrossReference_argsTupleSchemeFactory implements SchemeFactory { + public GetCrossReference_argsTupleScheme getScheme() { + return new GetCrossReference_argsTupleScheme(); } } - private static class GetFunctions_argsTupleScheme extends TupleScheme { + private static class GetCrossReference_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetReq()) { @@ -9227,11 +11951,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args s } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.req = new TGetFunctionsReq(); + struct.req = new TGetCrossReferenceReq(); struct.req.read(iprot); struct.setReqIsSet(true); } @@ -9240,18 +11964,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args st } - public static class GetFunctions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_result"); + public static class GetCrossReference_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCrossReference_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 GetFunctions_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetFunctions_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new GetCrossReference_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new GetCrossReference_resultTupleSchemeFactory()); } - private TGetFunctionsResp success; // required + private TGetCrossReferenceResp 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 { @@ -9316,16 +12040,16 @@ public String getFieldName() { 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, TGetFunctionsResp.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetCrossReferenceResp.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetFunctions_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetCrossReference_result.class, metaDataMap); } - public GetFunctions_result() { + public GetCrossReference_result() { } - public GetFunctions_result( - TGetFunctionsResp success) + public GetCrossReference_result( + TGetCrossReferenceResp success) { this(); this.success = success; @@ -9334,14 +12058,14 @@ public GetFunctions_result( /** * Performs a deep copy on other. */ - public GetFunctions_result(GetFunctions_result other) { + public GetCrossReference_result(GetCrossReference_result other) { if (other.isSetSuccess()) { - this.success = new TGetFunctionsResp(other.success); + this.success = new TGetCrossReferenceResp(other.success); } } - public GetFunctions_result deepCopy() { - return new GetFunctions_result(this); + public GetCrossReference_result deepCopy() { + return new GetCrossReference_result(this); } @Override @@ -9349,11 +12073,11 @@ public void clear() { this.success = null; } - public TGetFunctionsResp getSuccess() { + public TGetCrossReferenceResp getSuccess() { return this.success; } - public void setSuccess(TGetFunctionsResp success) { + public void setSuccess(TGetCrossReferenceResp success) { this.success = success; } @@ -9378,7 +12102,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetSuccess(); } else { - setSuccess((TGetFunctionsResp)value); + setSuccess((TGetCrossReferenceResp)value); } break; @@ -9411,12 +12135,12 @@ public boolean isSet(_Fields field) { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof GetFunctions_result) - return this.equals((GetFunctions_result)that); + if (that instanceof GetCrossReference_result) + return this.equals((GetCrossReference_result)that); return false; } - public boolean equals(GetFunctions_result that) { + public boolean equals(GetCrossReference_result that) { if (that == null) return false; @@ -9434,30 +12158,30 @@ public boolean equals(GetFunctions_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } - public int compareTo(GetFunctions_result other) { + @Override + public int compareTo(GetCrossReference_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetFunctions_result typedOther = (GetFunctions_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -9479,7 +12203,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache. @Override public String toString() { - StringBuilder sb = new StringBuilder("GetFunctions_result("); + StringBuilder sb = new StringBuilder("GetCrossReference_result("); boolean first = true; sb.append("success:"); @@ -9517,15 +12241,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class GetFunctions_resultStandardSchemeFactory implements SchemeFactory { - public GetFunctions_resultStandardScheme getScheme() { - return new GetFunctions_resultStandardScheme(); + private static class GetCrossReference_resultStandardSchemeFactory implements SchemeFactory { + public GetCrossReference_resultStandardScheme getScheme() { + return new GetCrossReference_resultStandardScheme(); } } - private static class GetFunctions_resultStandardScheme extends StandardScheme { + private static class GetCrossReference_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, GetCrossReference_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -9537,7 +12261,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_result switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new TGetFunctionsResp(); + struct.success = new TGetCrossReferenceResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { @@ -9553,7 +12277,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_result struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, GetCrossReference_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -9568,16 +12292,16 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, GetFunctions_resul } - private static class GetFunctions_resultTupleSchemeFactory implements SchemeFactory { - public GetFunctions_resultTupleScheme getScheme() { - return new GetFunctions_resultTupleScheme(); + private static class GetCrossReference_resultTupleSchemeFactory implements SchemeFactory { + public GetCrossReference_resultTupleScheme getScheme() { + return new GetCrossReference_resultTupleScheme(); } } - private static class GetFunctions_resultTupleScheme extends TupleScheme { + private static class GetCrossReference_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { @@ -9590,11 +12314,11 @@ public void write(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = new TGetFunctionsResp(); + struct.success = new TGetCrossReferenceResp(); struct.success.read(iprot); struct.setSuccessIsSet(true); } @@ -9603,7 +12327,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result } - public static class GetOperationStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetOperationStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOperationStatus_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); @@ -9797,30 +12521,30 @@ public boolean equals(GetOperationStatus_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetOperationStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetOperationStatus_args typedOther = (GetOperationStatus_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -9966,7 +12690,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_a } - public static class GetOperationStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetOperationStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOperationStatus_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); @@ -10160,30 +12884,30 @@ public boolean equals(GetOperationStatus_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetOperationStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetOperationStatus_result typedOther = (GetOperationStatus_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -10329,7 +13053,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_r } - public static class CancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelOperation_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); @@ -10523,30 +13247,30 @@ public boolean equals(CancelOperation_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CancelOperation_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CancelOperation_args typedOther = (CancelOperation_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -10692,7 +13416,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_args } - public static class CancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelOperation_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); @@ -10886,30 +13610,30 @@ public boolean equals(CancelOperation_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CancelOperation_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CancelOperation_result typedOther = (CancelOperation_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -11055,7 +13779,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_resu } - public static class CloseOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CloseOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseOperation_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); @@ -11249,30 +13973,30 @@ public boolean equals(CloseOperation_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CloseOperation_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CloseOperation_args typedOther = (CloseOperation_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -11418,7 +14142,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_args } - public static class CloseOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CloseOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseOperation_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); @@ -11612,30 +14336,30 @@ public boolean equals(CloseOperation_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CloseOperation_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CloseOperation_result typedOther = (CloseOperation_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -11781,7 +14505,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_resul } - public static class GetResultSetMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetResultSetMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetResultSetMetadata_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); @@ -11975,30 +14699,30 @@ public boolean equals(GetResultSetMetadata_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetResultSetMetadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetResultSetMetadata_args typedOther = (GetResultSetMetadata_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -12144,7 +14868,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata } - public static class GetResultSetMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetResultSetMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetResultSetMetadata_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); @@ -12338,30 +15062,30 @@ public boolean equals(GetResultSetMetadata_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetResultSetMetadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetResultSetMetadata_result typedOther = (GetResultSetMetadata_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -12507,7 +15231,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata } - public static class FetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class FetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FetchResults_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); @@ -12701,30 +15425,30 @@ public boolean equals(FetchResults_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(FetchResults_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - FetchResults_args typedOther = (FetchResults_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -12870,7 +15594,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_args st } - public static class FetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class FetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FetchResults_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); @@ -13064,30 +15788,30 @@ public boolean equals(FetchResults_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(FetchResults_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - FetchResults_result typedOther = (FetchResults_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -13233,7 +15957,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_result } - public static class GetDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetDelegationToken_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); @@ -13427,30 +16151,30 @@ public boolean equals(GetDelegationToken_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetDelegationToken_args typedOther = (GetDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -13596,7 +16320,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_a } - public static class GetDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class GetDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetDelegationToken_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); @@ -13790,30 +16514,30 @@ public boolean equals(GetDelegationToken_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(GetDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - GetDelegationToken_result typedOther = (GetDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -13959,7 +16683,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_r } - public static class CancelDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CancelDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelDelegationToken_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); @@ -14153,30 +16877,30 @@ public boolean equals(CancelDelegationToken_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CancelDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CancelDelegationToken_args typedOther = (CancelDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -14322,7 +17046,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke } - public static class CancelDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class CancelDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelDelegationToken_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); @@ -14516,30 +17240,30 @@ public boolean equals(CancelDelegationToken_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(CancelDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - CancelDelegationToken_result typedOther = (CancelDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } @@ -14685,7 +17409,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke } - public static class RenewDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class RenewDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RenewDelegationToken_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); @@ -14879,30 +17603,30 @@ public boolean equals(RenewDelegationToken_args that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_req = true && (isSetReq()); - builder.append(present_req); + list.add(present_req); if (present_req) - builder.append(req); + list.add(req); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(RenewDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - RenewDelegationToken_args typedOther = (RenewDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); if (lastComparison != 0) { return lastComparison; } @@ -15048,7 +17772,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, RenewDelegationToken } - public static class RenewDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + public static class RenewDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RenewDelegationToken_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); @@ -15242,30 +17966,30 @@ public boolean equals(RenewDelegationToken_result that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_success = true && (isSetSuccess()); - builder.append(present_success); + list.add(present_success); if (present_success) - builder.append(success); + list.add(success); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(RenewDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - RenewDelegationToken_result typedOther = (RenewDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java new file mode 100644 index 0000000000000..930bed731ed2a --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java @@ -0,0 +1,106 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import 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 TCLIServiceConstants { + + public static final Set PRIMITIVE_TYPES = new HashSet(); + static { + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.BOOLEAN_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.TINYINT_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.SMALLINT_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.INT_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.BIGINT_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.FLOAT_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.DOUBLE_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.STRING_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.TIMESTAMP_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.BINARY_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.DECIMAL_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.NULL_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.DATE_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.VARCHAR_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.CHAR_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE); + PRIMITIVE_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE); + } + + public static final Set COMPLEX_TYPES = new HashSet(); + static { + COMPLEX_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.ARRAY_TYPE); + COMPLEX_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.MAP_TYPE); + COMPLEX_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.STRUCT_TYPE); + COMPLEX_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.UNION_TYPE); + COMPLEX_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.USER_DEFINED_TYPE); + } + + public static final Set COLLECTION_TYPES = new HashSet(); + static { + COLLECTION_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.ARRAY_TYPE); + COLLECTION_TYPES.add(org.apache.hive.service.rpc.thrift.TTypeId.MAP_TYPE); + } + + public static final Map TYPE_NAMES = new HashMap(); + static { + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.BOOLEAN_TYPE, "BOOLEAN"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.TINYINT_TYPE, "TINYINT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.SMALLINT_TYPE, "SMALLINT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.INT_TYPE, "INT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.BIGINT_TYPE, "BIGINT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.FLOAT_TYPE, "FLOAT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.DOUBLE_TYPE, "DOUBLE"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.STRING_TYPE, "STRING"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.TIMESTAMP_TYPE, "TIMESTAMP"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.BINARY_TYPE, "BINARY"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.ARRAY_TYPE, "ARRAY"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.MAP_TYPE, "MAP"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.STRUCT_TYPE, "STRUCT"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.UNION_TYPE, "UNIONTYPE"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.DECIMAL_TYPE, "DECIMAL"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.NULL_TYPE, "NULL"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.DATE_TYPE, "DATE"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.VARCHAR_TYPE, "VARCHAR"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.CHAR_TYPE, "CHAR"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE, "INTERVAL_YEAR_MONTH"); + TYPE_NAMES.put(org.apache.hive.service.rpc.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE, "INTERVAL_DAY_TIME"); + } + + public static final String CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength"; + + public static final String PRECISION = "precision"; + + public static final String SCALE = "scale"; + +} diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java index e23fcdd77a1a4..a7d4e7de1f60d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCancelDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCancelDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelDelegationTokenReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -283,45 +287,45 @@ public boolean equals(TCancelDelegationTokenReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_delegationToken = true && (isSetDelegationToken()); - builder.append(present_delegationToken); + list.add(present_delegationToken); if (present_delegationToken) - builder.append(delegationToken); + list.add(delegationToken); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCancelDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCancelDelegationTokenReq typedOther = (TCancelDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java index 77c9ee77ec59b..611e92ca2af30 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelDelegationTokenResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCancelDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCancelDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelDelegationTokenResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCancelDelegationTokenResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCancelDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCancelDelegationTokenResp typedOther = (TCancelDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java index 45eac48ab12d3..4076c573fafb7 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelOperationReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCancelOperationReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCancelOperationReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCancelOperationReq typedOther = (TCancelOperationReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java index 2a39414d601aa..7bcc765c85daa 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCancelOperationResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCancelOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCancelOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelOperationResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCancelOperationResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCancelOperationResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCancelOperationResp typedOther = (TCancelOperationResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java index 0cbb7ccced073..47a6b8329c05b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseOperationReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCloseOperationReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCloseOperationReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCloseOperationReq typedOther = (TCloseOperationReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java index 7334d67173d7b..0860a2b1c5bac 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseOperationResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCloseOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCloseOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseOperationResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCloseOperationResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCloseOperationResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCloseOperationResp typedOther = (TCloseOperationResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java index 027e8295436b0..43ee87f487a67 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseSessionReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCloseSessionReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCloseSessionReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCloseSessionReq typedOther = (TCloseSessionReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java index 168c8fc775e33..38f82ac8d3cd2 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TCloseSessionResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TCloseSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TCloseSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseSessionResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TCloseSessionResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TCloseSessionResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TCloseSessionResp typedOther = (TCloseSessionResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java similarity index 97% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java index fc2171dc99e4c..dd79482200961 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.BitSet; import 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 TColumn extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -345,6 +348,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip 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; } } @@ -697,19 +701,19 @@ public int compareTo(TColumn other) { @Override public int hashCode() { - HashCodeBuilder hcb = new HashCodeBuilder(); - hcb.append(this.getClass().getName()); + List list = new ArrayList(); + list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { - hcb.append(setField.getThriftFieldId()); + list.add(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { - hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { - hcb.append(value); + list.add(value); } } - return hcb.toHashCode(); + return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnDesc.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnDesc.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java index 247db6489457f..31472c8f54b94 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnDesc.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnDesc.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TColumnDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TColumnDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnDesc"); 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)1); @@ -120,7 +124,7 @@ public String getFieldName() { // isset id assignments private static final int __POSITION_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.COMMENT}; + private static final _Fields optionals[] = {_Fields.COMMENT}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -318,7 +322,7 @@ public Object getFieldValue(_Fields field) { return getTypeDesc(); case POSITION: - return Integer.valueOf(getPosition()); + return getPosition(); case COMMENT: return getComment(); @@ -400,75 +404,75 @@ public boolean equals(TColumnDesc that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_columnName = true && (isSetColumnName()); - builder.append(present_columnName); + list.add(present_columnName); if (present_columnName) - builder.append(columnName); + list.add(columnName); boolean present_typeDesc = true && (isSetTypeDesc()); - builder.append(present_typeDesc); + list.add(present_typeDesc); if (present_typeDesc) - builder.append(typeDesc); + list.add(typeDesc); boolean present_position = true; - builder.append(present_position); + list.add(present_position); if (present_position) - builder.append(position); + list.add(position); boolean present_comment = true && (isSetComment()); - builder.append(present_comment); + list.add(present_comment); if (present_comment) - builder.append(comment); + list.add(comment); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TColumnDesc other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TColumnDesc typedOther = (TColumnDesc)other; - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTypeDesc()).compareTo(typedOther.isSetTypeDesc()); + lastComparison = Boolean.valueOf(isSetTypeDesc()).compareTo(other.isSetTypeDesc()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeDesc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeDesc, typedOther.typeDesc); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeDesc, other.typeDesc); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPosition()).compareTo(typedOther.isSetPosition()); + lastComparison = Boolean.valueOf(isSetPosition()).compareTo(other.isSetPosition()); if (lastComparison != 0) { return lastComparison; } if (isSetPosition()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, typedOther.position); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, other.position); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment()); + lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); if (lastComparison != 0) { return lastComparison; } if (isSetComment()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java similarity index 97% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java index 8504c6d608d42..d1cc8e919bc0c 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TColumnValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TColumnValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.BitSet; import 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 TColumnValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue"); private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -318,6 +321,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip 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; } } @@ -636,19 +640,19 @@ public int compareTo(TColumnValue other) { @Override public int hashCode() { - HashCodeBuilder hcb = new HashCodeBuilder(); - hcb.append(this.getClass().getName()); + List list = new ArrayList(); + list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { - hcb.append(setField.getThriftFieldId()); + list.add(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { - hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { - hcb.append(value); + list.add(value); } } - return hcb.toHashCode(); + return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java index 4fc54544c1bea..f93c9b4f0edc3 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TDoubleColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TDoubleColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDoubleColumn"); 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); @@ -129,7 +133,7 @@ public TDoubleColumn( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TDoubleColumn( */ public TDoubleColumn(TDoubleColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Double other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TDoubleColumn that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TDoubleColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TDoubleColumn typedOther = (TDoubleColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TDoubleColumn struc { org.apache.thrift.protocol.TList _list94 = iprot.readListBegin(); struct.values = new ArrayList(_list94.size); - for (int _i95 = 0; _i95 < _list94.size; ++_i95) + double _elem95; + for (int _i96 = 0; _i96 < _list94.size; ++_i96) { - double _elem96; // optional - _elem96 = iprot.readDouble(); - struct.values.add(_elem96); + _elem95 = iprot.readDouble(); + struct.values.add(_elem95); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TDoubleColumn struct { org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); struct.values = new ArrayList(_list99.size); - for (int _i100 = 0; _i100 < _list99.size; ++_i100) + double _elem100; + for (int _i101 = 0; _i101 < _list99.size; ++_i101) { - double _elem101; // optional - _elem101 = iprot.readDouble(); - struct.values.add(_elem101); + _elem100 = iprot.readDouble(); + struct.values.add(_elem100); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java index d21573633ef51..5700355aad94d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TDoubleValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TDoubleValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TDoubleValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TDoubleValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDoubleValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.DOUBLE, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Double.valueOf(getValue()); + return getValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TDoubleValue that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TDoubleValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TDoubleValue typedOther = (TDoubleValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java similarity index 81% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java index 4f157ad5a6450..1f73cec61af78 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,16 +29,20 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExecuteStatementReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("statement", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CONF_OVERLAY_FIELD_DESC = new org.apache.thrift.protocol.TField("confOverlay", org.apache.thrift.protocol.TType.MAP, (short)3); private static final org.apache.thrift.protocol.TField RUN_ASYNC_FIELD_DESC = new org.apache.thrift.protocol.TField("runAsync", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField QUERY_TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("queryTimeout", org.apache.thrift.protocol.TType.I64, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -49,13 +54,15 @@ public class TExecuteStatementReq implements org.apache.thrift.TBase confOverlay; // optional private boolean runAsync; // optional + private long queryTimeout; // 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 { SESSION_HANDLE((short)1, "sessionHandle"), STATEMENT((short)2, "statement"), CONF_OVERLAY((short)3, "confOverlay"), - RUN_ASYNC((short)4, "runAsync"); + RUN_ASYNC((short)4, "runAsync"), + QUERY_TIMEOUT((short)5, "queryTimeout"); private static final Map byName = new HashMap(); @@ -78,6 +85,8 @@ public static _Fields findByThriftId(int fieldId) { return CONF_OVERLAY; case 4: // RUN_ASYNC return RUN_ASYNC; + case 5: // QUERY_TIMEOUT + return QUERY_TIMEOUT; default: return null; } @@ -119,8 +128,9 @@ public String getFieldName() { // isset id assignments private static final int __RUNASYNC_ISSET_ID = 0; + private static final int __QUERYTIMEOUT_ISSET_ID = 1; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.CONF_OVERLAY,_Fields.RUN_ASYNC}; + private static final _Fields optionals[] = {_Fields.CONF_OVERLAY,_Fields.RUN_ASYNC,_Fields.QUERY_TIMEOUT}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -134,6 +144,8 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.RUN_ASYNC, new org.apache.thrift.meta_data.FieldMetaData("runAsync", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.QUERY_TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("queryTimeout", 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(TExecuteStatementReq.class, metaDataMap); } @@ -141,6 +153,8 @@ public String getFieldName() { public TExecuteStatementReq() { this.runAsync = false; + this.queryTimeout = 0L; + } public TExecuteStatementReq( @@ -164,21 +178,11 @@ public TExecuteStatementReq(TExecuteStatementReq other) { this.statement = other.statement; } if (other.isSetConfOverlay()) { - Map __this__confOverlay = new HashMap(); - for (Map.Entry other_element : other.confOverlay.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__confOverlay_copy_key = other_element_key; - - String __this__confOverlay_copy_value = other_element_value; - - __this__confOverlay.put(__this__confOverlay_copy_key, __this__confOverlay_copy_value); - } + Map __this__confOverlay = new HashMap(other.confOverlay); this.confOverlay = __this__confOverlay; } this.runAsync = other.runAsync; + this.queryTimeout = other.queryTimeout; } public TExecuteStatementReq deepCopy() { @@ -192,6 +196,8 @@ public void clear() { this.confOverlay = null; this.runAsync = false; + this.queryTimeout = 0L; + } public TSessionHandle getSessionHandle() { @@ -296,6 +302,28 @@ public void setRunAsyncIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RUNASYNC_ISSET_ID, value); } + public long getQueryTimeout() { + return this.queryTimeout; + } + + public void setQueryTimeout(long queryTimeout) { + this.queryTimeout = queryTimeout; + setQueryTimeoutIsSet(true); + } + + public void unsetQueryTimeout() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID); + } + + /** Returns true if field queryTimeout is set (has been assigned a value) and false otherwise */ + public boolean isSetQueryTimeout() { + return EncodingUtils.testBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID); + } + + public void setQueryTimeoutIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SESSION_HANDLE: @@ -330,6 +358,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case QUERY_TIMEOUT: + if (value == null) { + unsetQueryTimeout(); + } else { + setQueryTimeout((Long)value); + } + break; + } } @@ -345,7 +381,10 @@ public Object getFieldValue(_Fields field) { return getConfOverlay(); case RUN_ASYNC: - return Boolean.valueOf(isRunAsync()); + return isRunAsync(); + + case QUERY_TIMEOUT: + return getQueryTimeout(); } throw new IllegalStateException(); @@ -366,6 +405,8 @@ public boolean isSet(_Fields field) { return isSetConfOverlay(); case RUN_ASYNC: return isSetRunAsync(); + case QUERY_TIMEOUT: + return isSetQueryTimeout(); } throw new IllegalStateException(); } @@ -419,80 +460,104 @@ public boolean equals(TExecuteStatementReq that) { return false; } + boolean this_present_queryTimeout = true && this.isSetQueryTimeout(); + boolean that_present_queryTimeout = true && that.isSetQueryTimeout(); + if (this_present_queryTimeout || that_present_queryTimeout) { + if (!(this_present_queryTimeout && that_present_queryTimeout)) + return false; + if (this.queryTimeout != that.queryTimeout) + return false; + } + return true; } @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_statement = true && (isSetStatement()); - builder.append(present_statement); + list.add(present_statement); if (present_statement) - builder.append(statement); + list.add(statement); boolean present_confOverlay = true && (isSetConfOverlay()); - builder.append(present_confOverlay); + list.add(present_confOverlay); if (present_confOverlay) - builder.append(confOverlay); + list.add(confOverlay); boolean present_runAsync = true && (isSetRunAsync()); - builder.append(present_runAsync); + list.add(present_runAsync); if (present_runAsync) - builder.append(runAsync); + list.add(runAsync); - return builder.toHashCode(); + boolean present_queryTimeout = true && (isSetQueryTimeout()); + list.add(present_queryTimeout); + if (present_queryTimeout) + list.add(queryTimeout); + + return list.hashCode(); } + @Override public int compareTo(TExecuteStatementReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TExecuteStatementReq typedOther = (TExecuteStatementReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetStatement()).compareTo(typedOther.isSetStatement()); + lastComparison = Boolean.valueOf(isSetStatement()).compareTo(other.isSetStatement()); if (lastComparison != 0) { return lastComparison; } if (isSetStatement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, typedOther.statement); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfOverlay()).compareTo(typedOther.isSetConfOverlay()); + lastComparison = Boolean.valueOf(isSetConfOverlay()).compareTo(other.isSetConfOverlay()); if (lastComparison != 0) { return lastComparison; } if (isSetConfOverlay()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.confOverlay, typedOther.confOverlay); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.confOverlay, other.confOverlay); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRunAsync()).compareTo(typedOther.isSetRunAsync()); + lastComparison = Boolean.valueOf(isSetRunAsync()).compareTo(other.isSetRunAsync()); if (lastComparison != 0) { return lastComparison; } if (isSetRunAsync()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAsync, typedOther.runAsync); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAsync, other.runAsync); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryTimeout()).compareTo(other.isSetQueryTimeout()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryTimeout()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryTimeout, other.queryTimeout); if (lastComparison != 0) { return lastComparison; } @@ -548,6 +613,12 @@ public String toString() { sb.append(this.runAsync); first = false; } + if (isSetQueryTimeout()) { + if (!first) sb.append(", "); + sb.append("queryTimeout:"); + sb.append(this.queryTimeout); + first = false; + } sb.append(")"); return sb.toString(); } @@ -626,13 +697,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementRe { org.apache.thrift.protocol.TMap _map162 = iprot.readMapBegin(); struct.confOverlay = new HashMap(2*_map162.size); - for (int _i163 = 0; _i163 < _map162.size; ++_i163) + String _key163; + String _val164; + for (int _i165 = 0; _i165 < _map162.size; ++_i165) { - String _key164; // required - String _val165; // required - _key164 = iprot.readString(); - _val165 = iprot.readString(); - struct.confOverlay.put(_key164, _val165); + _key163 = iprot.readString(); + _val164 = iprot.readString(); + struct.confOverlay.put(_key163, _val164); } iprot.readMapEnd(); } @@ -649,6 +720,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementRe org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 5: // QUERY_TIMEOUT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.queryTimeout = iprot.readI64(); + struct.setQueryTimeoutIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -692,6 +771,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TExecuteStatementR oprot.writeBool(struct.runAsync); oprot.writeFieldEnd(); } + if (struct.isSetQueryTimeout()) { + oprot.writeFieldBegin(QUERY_TIMEOUT_FIELD_DESC); + oprot.writeI64(struct.queryTimeout); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -718,7 +802,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementRe if (struct.isSetRunAsync()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetQueryTimeout()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetConfOverlay()) { { oprot.writeI32(struct.confOverlay.size()); @@ -732,6 +819,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementRe if (struct.isSetRunAsync()) { oprot.writeBool(struct.runAsync); } + if (struct.isSetQueryTimeout()) { + oprot.writeI64(struct.queryTimeout); + } } @Override @@ -742,18 +832,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementReq struct.setSessionHandleIsSet(true); struct.statement = iprot.readString(); struct.setStatementIsSet(true); - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map168 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.confOverlay = new HashMap(2*_map168.size); - for (int _i169 = 0; _i169 < _map168.size; ++_i169) + String _key169; + String _val170; + for (int _i171 = 0; _i171 < _map168.size; ++_i171) { - String _key170; // required - String _val171; // required - _key170 = iprot.readString(); - _val171 = iprot.readString(); - struct.confOverlay.put(_key170, _val171); + _key169 = iprot.readString(); + _val170 = iprot.readString(); + struct.confOverlay.put(_key169, _val170); } } struct.setConfOverlayIsSet(true); @@ -762,6 +852,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementReq struct.runAsync = iprot.readBool(); struct.setRunAsyncIsSet(true); } + if (incoming.get(2)) { + struct.queryTimeout = iprot.readI64(); + struct.setQueryTimeoutIsSet(true); + } } } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java index fdde51e70f783..7101fa5bdb84c 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TExecuteStatementResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExecuteStatementResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TExecuteStatementResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TExecuteStatementResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TExecuteStatementResp typedOther = (TExecuteStatementResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchOrientation.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java similarity index 92% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchOrientation.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java index b2a22effd91af..159be45259434 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchOrientation.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchOrientation.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java index 068711fc44440..2c93339d0c68b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFetchResultsReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -125,7 +129,7 @@ public String getFieldName() { private static final int __MAXROWS_ISSET_ID = 0; private static final int __FETCHTYPE_ISSET_ID = 1; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.FETCH_TYPE}; + private static final _Fields optionals[] = {_Fields.FETCH_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); @@ -142,7 +146,7 @@ public String getFieldName() { } public TFetchResultsReq() { - this.orientation = org.apache.hive.service.cli.thrift.TFetchOrientation.FETCH_NEXT; + this.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.FETCH_NEXT; this.fetchType = (short)0; @@ -182,7 +186,7 @@ public TFetchResultsReq deepCopy() { @Override public void clear() { this.operationHandle = null; - this.orientation = org.apache.hive.service.cli.thrift.TFetchOrientation.FETCH_NEXT; + this.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.FETCH_NEXT; setMaxRowsIsSet(false); this.maxRows = 0; @@ -334,10 +338,10 @@ public Object getFieldValue(_Fields field) { return getOrientation(); case MAX_ROWS: - return Long.valueOf(getMaxRows()); + return getMaxRows(); case FETCH_TYPE: - return Short.valueOf(getFetchType()); + return getFetchType(); } throw new IllegalStateException(); @@ -416,75 +420,75 @@ public boolean equals(TFetchResultsReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); boolean present_orientation = true && (isSetOrientation()); - builder.append(present_orientation); + list.add(present_orientation); if (present_orientation) - builder.append(orientation.getValue()); + list.add(orientation.getValue()); boolean present_maxRows = true; - builder.append(present_maxRows); + list.add(present_maxRows); if (present_maxRows) - builder.append(maxRows); + list.add(maxRows); boolean present_fetchType = true && (isSetFetchType()); - builder.append(present_fetchType); + list.add(present_fetchType); if (present_fetchType) - builder.append(fetchType); + list.add(fetchType); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TFetchResultsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TFetchResultsReq typedOther = (TFetchResultsReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOrientation()).compareTo(typedOther.isSetOrientation()); + lastComparison = Boolean.valueOf(isSetOrientation()).compareTo(other.isSetOrientation()); if (lastComparison != 0) { return lastComparison; } if (isSetOrientation()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientation, typedOther.orientation); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientation, other.orientation); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxRows()).compareTo(typedOther.isSetMaxRows()); + lastComparison = Boolean.valueOf(isSetMaxRows()).compareTo(other.isSetMaxRows()); if (lastComparison != 0) { return lastComparison; } if (isSetMaxRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRows, typedOther.maxRows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRows, other.maxRows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFetchType()).compareTo(typedOther.isSetFetchType()); + lastComparison = Boolean.valueOf(isSetFetchType()).compareTo(other.isSetFetchType()); if (lastComparison != 0) { return lastComparison; } if (isSetFetchType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchType, typedOther.fetchType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchType, other.fetchType); if (lastComparison != 0) { return lastComparison; } @@ -605,7 +609,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsReq st break; case 2: // ORIENTATION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); + struct.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -694,7 +698,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TFetchResultsReq str struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(true); - struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); + struct.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); struct.maxRows = iprot.readI64(); struct.setMaxRowsIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java index 19991f1da3eb3..8f86cee3ad468 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TFetchResultsResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFetchResultsResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -115,7 +119,7 @@ public String getFieldName() { // isset id assignments private static final int __HASMOREROWS_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.HAS_MORE_ROWS,_Fields.RESULTS}; + private static final _Fields optionals[] = {_Fields.HAS_MORE_ROWS,_Fields.RESULTS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -268,7 +272,7 @@ public Object getFieldValue(_Fields field) { return getStatus(); case HAS_MORE_ROWS: - return Boolean.valueOf(isHasMoreRows()); + return isHasMoreRows(); case RESULTS: return getResults(); @@ -339,60 +343,60 @@ public boolean equals(TFetchResultsResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_hasMoreRows = true && (isSetHasMoreRows()); - builder.append(present_hasMoreRows); + list.add(present_hasMoreRows); if (present_hasMoreRows) - builder.append(hasMoreRows); + list.add(hasMoreRows); boolean present_results = true && (isSetResults()); - builder.append(present_results); + list.add(present_results); if (present_results) - builder.append(results); + list.add(results); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TFetchResultsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TFetchResultsResp typedOther = (TFetchResultsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHasMoreRows()).compareTo(typedOther.isSetHasMoreRows()); + lastComparison = Boolean.valueOf(isSetHasMoreRows()).compareTo(other.isSetHasMoreRows()); if (lastComparison != 0) { return lastComparison; } if (isSetHasMoreRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasMoreRows, typedOther.hasMoreRows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasMoreRows, other.hasMoreRows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetResults()).compareTo(typedOther.isSetResults()); + lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults()); if (lastComparison != 0) { return lastComparison; } if (isSetResults()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.results, typedOther.results); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.results, other.results); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java index cfd157f701b26..b8a2ca6648069 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetCatalogsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetCatalogsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCatalogsReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TGetCatalogsReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetCatalogsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetCatalogsReq typedOther = (TGetCatalogsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java index 1c5a35437d416..eeeac9a1f9292 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetCatalogsResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetCatalogsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetCatalogsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCatalogsResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetCatalogsResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetCatalogsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetCatalogsResp typedOther = (TGetCatalogsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java similarity index 95% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java index a2c793bd95927..ba80279294957 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetColumnsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetColumnsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetColumnsReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -123,7 +127,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.COLUMN_NAME}; + private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.COLUMN_NAME}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -450,90 +454,90 @@ public boolean equals(TGetColumnsReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_catalogName = true && (isSetCatalogName()); - builder.append(present_catalogName); + list.add(present_catalogName); if (present_catalogName) - builder.append(catalogName); + list.add(catalogName); boolean present_schemaName = true && (isSetSchemaName()); - builder.append(present_schemaName); + list.add(present_schemaName); if (present_schemaName) - builder.append(schemaName); + list.add(schemaName); boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); + list.add(present_tableName); if (present_tableName) - builder.append(tableName); + list.add(tableName); boolean present_columnName = true && (isSetColumnName()); - builder.append(present_columnName); + list.add(present_columnName); if (present_columnName) - builder.append(columnName); + list.add(columnName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetColumnsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetColumnsReq typedOther = (TGetColumnsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java index d6cf1be6d304b..c68aac9042fc1 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetColumnsResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetColumnsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetColumnsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetColumnsResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetColumnsResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetColumnsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetColumnsResp typedOther = (TGetColumnsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java new file mode 100644 index 0000000000000..972957063b297 --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java @@ -0,0 +1,1034 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetCrossReferenceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCrossReferenceReq"); + + private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField PARENT_CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentCatalogName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PARENT_SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentSchemaName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PARENT_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentTableName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField FOREIGN_CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignCatalogName", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField FOREIGN_SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignSchemaName", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField FOREIGN_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignTableName", org.apache.thrift.protocol.TType.STRING, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TGetCrossReferenceReqStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TGetCrossReferenceReqTupleSchemeFactory()); + } + + private TSessionHandle sessionHandle; // required + private String parentCatalogName; // optional + private String parentSchemaName; // optional + private String parentTableName; // optional + private String foreignCatalogName; // optional + private String foreignSchemaName; // optional + private String foreignTableName; // 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 { + SESSION_HANDLE((short)1, "sessionHandle"), + PARENT_CATALOG_NAME((short)2, "parentCatalogName"), + PARENT_SCHEMA_NAME((short)3, "parentSchemaName"), + PARENT_TABLE_NAME((short)4, "parentTableName"), + FOREIGN_CATALOG_NAME((short)5, "foreignCatalogName"), + FOREIGN_SCHEMA_NAME((short)6, "foreignSchemaName"), + FOREIGN_TABLE_NAME((short)7, "foreignTableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_HANDLE + return SESSION_HANDLE; + case 2: // PARENT_CATALOG_NAME + return PARENT_CATALOG_NAME; + case 3: // PARENT_SCHEMA_NAME + return PARENT_SCHEMA_NAME; + case 4: // PARENT_TABLE_NAME + return PARENT_TABLE_NAME; + case 5: // FOREIGN_CATALOG_NAME + return FOREIGN_CATALOG_NAME; + case 6: // FOREIGN_SCHEMA_NAME + return FOREIGN_SCHEMA_NAME; + case 7: // FOREIGN_TABLE_NAME + return FOREIGN_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 + private static final _Fields optionals[] = {_Fields.PARENT_CATALOG_NAME,_Fields.PARENT_SCHEMA_NAME,_Fields.PARENT_TABLE_NAME,_Fields.FOREIGN_CATALOG_NAME,_Fields.FOREIGN_SCHEMA_NAME,_Fields.FOREIGN_TABLE_NAME}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class))); + tmpMap.put(_Fields.PARENT_CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentCatalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.PARENT_SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentSchemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.PARENT_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentTableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.FOREIGN_CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignCatalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.FOREIGN_SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignSchemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.FOREIGN_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignTableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetCrossReferenceReq.class, metaDataMap); + } + + public TGetCrossReferenceReq() { + } + + public TGetCrossReferenceReq( + TSessionHandle sessionHandle) + { + this(); + this.sessionHandle = sessionHandle; + } + + /** + * Performs a deep copy on other. + */ + public TGetCrossReferenceReq(TGetCrossReferenceReq other) { + if (other.isSetSessionHandle()) { + this.sessionHandle = new TSessionHandle(other.sessionHandle); + } + if (other.isSetParentCatalogName()) { + this.parentCatalogName = other.parentCatalogName; + } + if (other.isSetParentSchemaName()) { + this.parentSchemaName = other.parentSchemaName; + } + if (other.isSetParentTableName()) { + this.parentTableName = other.parentTableName; + } + if (other.isSetForeignCatalogName()) { + this.foreignCatalogName = other.foreignCatalogName; + } + if (other.isSetForeignSchemaName()) { + this.foreignSchemaName = other.foreignSchemaName; + } + if (other.isSetForeignTableName()) { + this.foreignTableName = other.foreignTableName; + } + } + + public TGetCrossReferenceReq deepCopy() { + return new TGetCrossReferenceReq(this); + } + + @Override + public void clear() { + this.sessionHandle = null; + this.parentCatalogName = null; + this.parentSchemaName = null; + this.parentTableName = null; + this.foreignCatalogName = null; + this.foreignSchemaName = null; + this.foreignTableName = null; + } + + public TSessionHandle getSessionHandle() { + return this.sessionHandle; + } + + public void setSessionHandle(TSessionHandle sessionHandle) { + this.sessionHandle = sessionHandle; + } + + public void unsetSessionHandle() { + this.sessionHandle = null; + } + + /** Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionHandle() { + return this.sessionHandle != null; + } + + public void setSessionHandleIsSet(boolean value) { + if (!value) { + this.sessionHandle = null; + } + } + + public String getParentCatalogName() { + return this.parentCatalogName; + } + + public void setParentCatalogName(String parentCatalogName) { + this.parentCatalogName = parentCatalogName; + } + + public void unsetParentCatalogName() { + this.parentCatalogName = null; + } + + /** Returns true if field parentCatalogName is set (has been assigned a value) and false otherwise */ + public boolean isSetParentCatalogName() { + return this.parentCatalogName != null; + } + + public void setParentCatalogNameIsSet(boolean value) { + if (!value) { + this.parentCatalogName = null; + } + } + + public String getParentSchemaName() { + return this.parentSchemaName; + } + + public void setParentSchemaName(String parentSchemaName) { + this.parentSchemaName = parentSchemaName; + } + + public void unsetParentSchemaName() { + this.parentSchemaName = null; + } + + /** Returns true if field parentSchemaName is set (has been assigned a value) and false otherwise */ + public boolean isSetParentSchemaName() { + return this.parentSchemaName != null; + } + + public void setParentSchemaNameIsSet(boolean value) { + if (!value) { + this.parentSchemaName = null; + } + } + + public String getParentTableName() { + return this.parentTableName; + } + + public void setParentTableName(String parentTableName) { + this.parentTableName = parentTableName; + } + + public void unsetParentTableName() { + this.parentTableName = null; + } + + /** Returns true if field parentTableName is set (has been assigned a value) and false otherwise */ + public boolean isSetParentTableName() { + return this.parentTableName != null; + } + + public void setParentTableNameIsSet(boolean value) { + if (!value) { + this.parentTableName = null; + } + } + + public String getForeignCatalogName() { + return this.foreignCatalogName; + } + + public void setForeignCatalogName(String foreignCatalogName) { + this.foreignCatalogName = foreignCatalogName; + } + + public void unsetForeignCatalogName() { + this.foreignCatalogName = null; + } + + /** Returns true if field foreignCatalogName is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignCatalogName() { + return this.foreignCatalogName != null; + } + + public void setForeignCatalogNameIsSet(boolean value) { + if (!value) { + this.foreignCatalogName = null; + } + } + + public String getForeignSchemaName() { + return this.foreignSchemaName; + } + + public void setForeignSchemaName(String foreignSchemaName) { + this.foreignSchemaName = foreignSchemaName; + } + + public void unsetForeignSchemaName() { + this.foreignSchemaName = null; + } + + /** Returns true if field foreignSchemaName is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignSchemaName() { + return this.foreignSchemaName != null; + } + + public void setForeignSchemaNameIsSet(boolean value) { + if (!value) { + this.foreignSchemaName = null; + } + } + + public String getForeignTableName() { + return this.foreignTableName; + } + + public void setForeignTableName(String foreignTableName) { + this.foreignTableName = foreignTableName; + } + + public void unsetForeignTableName() { + this.foreignTableName = null; + } + + /** Returns true if field foreignTableName is set (has been assigned a value) and false otherwise */ + public boolean isSetForeignTableName() { + return this.foreignTableName != null; + } + + public void setForeignTableNameIsSet(boolean value) { + if (!value) { + this.foreignTableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SESSION_HANDLE: + if (value == null) { + unsetSessionHandle(); + } else { + setSessionHandle((TSessionHandle)value); + } + break; + + case PARENT_CATALOG_NAME: + if (value == null) { + unsetParentCatalogName(); + } else { + setParentCatalogName((String)value); + } + break; + + case PARENT_SCHEMA_NAME: + if (value == null) { + unsetParentSchemaName(); + } else { + setParentSchemaName((String)value); + } + break; + + case PARENT_TABLE_NAME: + if (value == null) { + unsetParentTableName(); + } else { + setParentTableName((String)value); + } + break; + + case FOREIGN_CATALOG_NAME: + if (value == null) { + unsetForeignCatalogName(); + } else { + setForeignCatalogName((String)value); + } + break; + + case FOREIGN_SCHEMA_NAME: + if (value == null) { + unsetForeignSchemaName(); + } else { + setForeignSchemaName((String)value); + } + break; + + case FOREIGN_TABLE_NAME: + if (value == null) { + unsetForeignTableName(); + } else { + setForeignTableName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_HANDLE: + return getSessionHandle(); + + case PARENT_CATALOG_NAME: + return getParentCatalogName(); + + case PARENT_SCHEMA_NAME: + return getParentSchemaName(); + + case PARENT_TABLE_NAME: + return getParentTableName(); + + case FOREIGN_CATALOG_NAME: + return getForeignCatalogName(); + + case FOREIGN_SCHEMA_NAME: + return getForeignSchemaName(); + + case FOREIGN_TABLE_NAME: + return getForeignTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SESSION_HANDLE: + return isSetSessionHandle(); + case PARENT_CATALOG_NAME: + return isSetParentCatalogName(); + case PARENT_SCHEMA_NAME: + return isSetParentSchemaName(); + case PARENT_TABLE_NAME: + return isSetParentTableName(); + case FOREIGN_CATALOG_NAME: + return isSetForeignCatalogName(); + case FOREIGN_SCHEMA_NAME: + return isSetForeignSchemaName(); + case FOREIGN_TABLE_NAME: + return isSetForeignTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TGetCrossReferenceReq) + return this.equals((TGetCrossReferenceReq)that); + return false; + } + + public boolean equals(TGetCrossReferenceReq that) { + if (that == null) + return false; + + boolean this_present_sessionHandle = true && this.isSetSessionHandle(); + boolean that_present_sessionHandle = true && that.isSetSessionHandle(); + if (this_present_sessionHandle || that_present_sessionHandle) { + if (!(this_present_sessionHandle && that_present_sessionHandle)) + return false; + if (!this.sessionHandle.equals(that.sessionHandle)) + return false; + } + + boolean this_present_parentCatalogName = true && this.isSetParentCatalogName(); + boolean that_present_parentCatalogName = true && that.isSetParentCatalogName(); + if (this_present_parentCatalogName || that_present_parentCatalogName) { + if (!(this_present_parentCatalogName && that_present_parentCatalogName)) + return false; + if (!this.parentCatalogName.equals(that.parentCatalogName)) + return false; + } + + boolean this_present_parentSchemaName = true && this.isSetParentSchemaName(); + boolean that_present_parentSchemaName = true && that.isSetParentSchemaName(); + if (this_present_parentSchemaName || that_present_parentSchemaName) { + if (!(this_present_parentSchemaName && that_present_parentSchemaName)) + return false; + if (!this.parentSchemaName.equals(that.parentSchemaName)) + return false; + } + + boolean this_present_parentTableName = true && this.isSetParentTableName(); + boolean that_present_parentTableName = true && that.isSetParentTableName(); + if (this_present_parentTableName || that_present_parentTableName) { + if (!(this_present_parentTableName && that_present_parentTableName)) + return false; + if (!this.parentTableName.equals(that.parentTableName)) + return false; + } + + boolean this_present_foreignCatalogName = true && this.isSetForeignCatalogName(); + boolean that_present_foreignCatalogName = true && that.isSetForeignCatalogName(); + if (this_present_foreignCatalogName || that_present_foreignCatalogName) { + if (!(this_present_foreignCatalogName && that_present_foreignCatalogName)) + return false; + if (!this.foreignCatalogName.equals(that.foreignCatalogName)) + return false; + } + + boolean this_present_foreignSchemaName = true && this.isSetForeignSchemaName(); + boolean that_present_foreignSchemaName = true && that.isSetForeignSchemaName(); + if (this_present_foreignSchemaName || that_present_foreignSchemaName) { + if (!(this_present_foreignSchemaName && that_present_foreignSchemaName)) + return false; + if (!this.foreignSchemaName.equals(that.foreignSchemaName)) + return false; + } + + boolean this_present_foreignTableName = true && this.isSetForeignTableName(); + boolean that_present_foreignTableName = true && that.isSetForeignTableName(); + if (this_present_foreignTableName || that_present_foreignTableName) { + if (!(this_present_foreignTableName && that_present_foreignTableName)) + return false; + if (!this.foreignTableName.equals(that.foreignTableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_sessionHandle = true && (isSetSessionHandle()); + list.add(present_sessionHandle); + if (present_sessionHandle) + list.add(sessionHandle); + + boolean present_parentCatalogName = true && (isSetParentCatalogName()); + list.add(present_parentCatalogName); + if (present_parentCatalogName) + list.add(parentCatalogName); + + boolean present_parentSchemaName = true && (isSetParentSchemaName()); + list.add(present_parentSchemaName); + if (present_parentSchemaName) + list.add(parentSchemaName); + + boolean present_parentTableName = true && (isSetParentTableName()); + list.add(present_parentTableName); + if (present_parentTableName) + list.add(parentTableName); + + boolean present_foreignCatalogName = true && (isSetForeignCatalogName()); + list.add(present_foreignCatalogName); + if (present_foreignCatalogName) + list.add(foreignCatalogName); + + boolean present_foreignSchemaName = true && (isSetForeignSchemaName()); + list.add(present_foreignSchemaName); + if (present_foreignSchemaName) + list.add(foreignSchemaName); + + boolean present_foreignTableName = true && (isSetForeignTableName()); + list.add(present_foreignTableName); + if (present_foreignTableName) + list.add(foreignTableName); + + return list.hashCode(); + } + + @Override + public int compareTo(TGetCrossReferenceReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionHandle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentCatalogName()).compareTo(other.isSetParentCatalogName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentCatalogName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentCatalogName, other.parentCatalogName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentSchemaName()).compareTo(other.isSetParentSchemaName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentSchemaName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSchemaName, other.parentSchemaName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParentTableName()).compareTo(other.isSetParentTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParentTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentTableName, other.parentTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeignCatalogName()).compareTo(other.isSetForeignCatalogName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignCatalogName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignCatalogName, other.foreignCatalogName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeignSchemaName()).compareTo(other.isSetForeignSchemaName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignSchemaName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignSchemaName, other.foreignSchemaName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetForeignTableName()).compareTo(other.isSetForeignTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetForeignTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignTableName, other.foreignTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TGetCrossReferenceReq("); + boolean first = true; + + sb.append("sessionHandle:"); + if (this.sessionHandle == null) { + sb.append("null"); + } else { + sb.append(this.sessionHandle); + } + first = false; + if (isSetParentCatalogName()) { + if (!first) sb.append(", "); + sb.append("parentCatalogName:"); + if (this.parentCatalogName == null) { + sb.append("null"); + } else { + sb.append(this.parentCatalogName); + } + first = false; + } + if (isSetParentSchemaName()) { + if (!first) sb.append(", "); + sb.append("parentSchemaName:"); + if (this.parentSchemaName == null) { + sb.append("null"); + } else { + sb.append(this.parentSchemaName); + } + first = false; + } + if (isSetParentTableName()) { + if (!first) sb.append(", "); + sb.append("parentTableName:"); + if (this.parentTableName == null) { + sb.append("null"); + } else { + sb.append(this.parentTableName); + } + first = false; + } + if (isSetForeignCatalogName()) { + if (!first) sb.append(", "); + sb.append("foreignCatalogName:"); + if (this.foreignCatalogName == null) { + sb.append("null"); + } else { + sb.append(this.foreignCatalogName); + } + first = false; + } + if (isSetForeignSchemaName()) { + if (!first) sb.append(", "); + sb.append("foreignSchemaName:"); + if (this.foreignSchemaName == null) { + sb.append("null"); + } else { + sb.append(this.foreignSchemaName); + } + first = false; + } + if (isSetForeignTableName()) { + if (!first) sb.append(", "); + sb.append("foreignTableName:"); + if (this.foreignTableName == null) { + sb.append("null"); + } else { + sb.append(this.foreignTableName); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetSessionHandle()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (sessionHandle != null) { + sessionHandle.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TGetCrossReferenceReqStandardSchemeFactory implements SchemeFactory { + public TGetCrossReferenceReqStandardScheme getScheme() { + return new TGetCrossReferenceReqStandardScheme(); + } + } + + private static class TGetCrossReferenceReqStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_HANDLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sessionHandle = new TSessionHandle(); + struct.sessionHandle.read(iprot); + struct.setSessionHandleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PARENT_CATALOG_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parentCatalogName = iprot.readString(); + struct.setParentCatalogNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PARENT_SCHEMA_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parentSchemaName = iprot.readString(); + struct.setParentSchemaNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PARENT_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.parentTableName = iprot.readString(); + struct.setParentTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // FOREIGN_CATALOG_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.foreignCatalogName = iprot.readString(); + struct.setForeignCatalogNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // FOREIGN_SCHEMA_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.foreignSchemaName = iprot.readString(); + struct.setForeignSchemaNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // FOREIGN_TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.foreignTableName = iprot.readString(); + struct.setForeignTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.sessionHandle != null) { + oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC); + struct.sessionHandle.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.parentCatalogName != null) { + if (struct.isSetParentCatalogName()) { + oprot.writeFieldBegin(PARENT_CATALOG_NAME_FIELD_DESC); + oprot.writeString(struct.parentCatalogName); + oprot.writeFieldEnd(); + } + } + if (struct.parentSchemaName != null) { + if (struct.isSetParentSchemaName()) { + oprot.writeFieldBegin(PARENT_SCHEMA_NAME_FIELD_DESC); + oprot.writeString(struct.parentSchemaName); + oprot.writeFieldEnd(); + } + } + if (struct.parentTableName != null) { + if (struct.isSetParentTableName()) { + oprot.writeFieldBegin(PARENT_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.parentTableName); + oprot.writeFieldEnd(); + } + } + if (struct.foreignCatalogName != null) { + if (struct.isSetForeignCatalogName()) { + oprot.writeFieldBegin(FOREIGN_CATALOG_NAME_FIELD_DESC); + oprot.writeString(struct.foreignCatalogName); + oprot.writeFieldEnd(); + } + } + if (struct.foreignSchemaName != null) { + if (struct.isSetForeignSchemaName()) { + oprot.writeFieldBegin(FOREIGN_SCHEMA_NAME_FIELD_DESC); + oprot.writeString(struct.foreignSchemaName); + oprot.writeFieldEnd(); + } + } + if (struct.foreignTableName != null) { + if (struct.isSetForeignTableName()) { + oprot.writeFieldBegin(FOREIGN_TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.foreignTableName); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TGetCrossReferenceReqTupleSchemeFactory implements SchemeFactory { + public TGetCrossReferenceReqTupleScheme getScheme() { + return new TGetCrossReferenceReqTupleScheme(); + } + } + + private static class TGetCrossReferenceReqTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.sessionHandle.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetParentCatalogName()) { + optionals.set(0); + } + if (struct.isSetParentSchemaName()) { + optionals.set(1); + } + if (struct.isSetParentTableName()) { + optionals.set(2); + } + if (struct.isSetForeignCatalogName()) { + optionals.set(3); + } + if (struct.isSetForeignSchemaName()) { + optionals.set(4); + } + if (struct.isSetForeignTableName()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetParentCatalogName()) { + oprot.writeString(struct.parentCatalogName); + } + if (struct.isSetParentSchemaName()) { + oprot.writeString(struct.parentSchemaName); + } + if (struct.isSetParentTableName()) { + oprot.writeString(struct.parentTableName); + } + if (struct.isSetForeignCatalogName()) { + oprot.writeString(struct.foreignCatalogName); + } + if (struct.isSetForeignSchemaName()) { + oprot.writeString(struct.foreignSchemaName); + } + if (struct.isSetForeignTableName()) { + oprot.writeString(struct.foreignTableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.sessionHandle = new TSessionHandle(); + struct.sessionHandle.read(iprot); + struct.setSessionHandleIsSet(true); + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.parentCatalogName = iprot.readString(); + struct.setParentCatalogNameIsSet(true); + } + if (incoming.get(1)) { + struct.parentSchemaName = iprot.readString(); + struct.setParentSchemaNameIsSet(true); + } + if (incoming.get(2)) { + struct.parentTableName = iprot.readString(); + struct.setParentTableNameIsSet(true); + } + if (incoming.get(3)) { + struct.foreignCatalogName = iprot.readString(); + struct.setForeignCatalogNameIsSet(true); + } + if (incoming.get(4)) { + struct.foreignSchemaName = iprot.readString(); + struct.setForeignSchemaNameIsSet(true); + } + if (incoming.get(5)) { + struct.foreignTableName = iprot.readString(); + struct.setForeignTableNameIsSet(true); + } + } + } + +} + diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java new file mode 100644 index 0000000000000..1bfe6d192df06 --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java @@ -0,0 +1,509 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetCrossReferenceResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCrossReferenceResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TGetCrossReferenceRespStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TGetCrossReferenceRespTupleSchemeFactory()); + } + + private TStatus status; // required + private TOperationHandle operationHandle; // 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 { + STATUS((short)1, "status"), + OPERATION_HANDLE((short)2, "operationHandle"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // OPERATION_HANDLE + return OPERATION_HANDLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(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.OPERATION_HANDLE}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStatus.class))); + tmpMap.put(_Fields.OPERATION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("operationHandle", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOperationHandle.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetCrossReferenceResp.class, metaDataMap); + } + + public TGetCrossReferenceResp() { + } + + public TGetCrossReferenceResp( + TStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TGetCrossReferenceResp(TGetCrossReferenceResp other) { + if (other.isSetStatus()) { + this.status = new TStatus(other.status); + } + if (other.isSetOperationHandle()) { + this.operationHandle = new TOperationHandle(other.operationHandle); + } + } + + public TGetCrossReferenceResp deepCopy() { + return new TGetCrossReferenceResp(this); + } + + @Override + public void clear() { + this.status = null; + this.operationHandle = null; + } + + public TStatus getStatus() { + return this.status; + } + + public void setStatus(TStatus status) { + this.status = status; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public TOperationHandle getOperationHandle() { + return this.operationHandle; + } + + public void setOperationHandle(TOperationHandle operationHandle) { + this.operationHandle = operationHandle; + } + + public void unsetOperationHandle() { + this.operationHandle = null; + } + + /** Returns true if field operationHandle is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationHandle() { + return this.operationHandle != null; + } + + public void setOperationHandleIsSet(boolean value) { + if (!value) { + this.operationHandle = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((TStatus)value); + } + break; + + case OPERATION_HANDLE: + if (value == null) { + unsetOperationHandle(); + } else { + setOperationHandle((TOperationHandle)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case OPERATION_HANDLE: + return getOperationHandle(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case OPERATION_HANDLE: + return isSetOperationHandle(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TGetCrossReferenceResp) + return this.equals((TGetCrossReferenceResp)that); + return false; + } + + public boolean equals(TGetCrossReferenceResp that) { + if (that == null) + return false; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_operationHandle = true && this.isSetOperationHandle(); + boolean that_present_operationHandle = true && that.isSetOperationHandle(); + if (this_present_operationHandle || that_present_operationHandle) { + if (!(this_present_operationHandle && that_present_operationHandle)) + return false; + if (!this.operationHandle.equals(that.operationHandle)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_status = true && (isSetStatus()); + list.add(present_status); + if (present_status) + list.add(status); + + boolean present_operationHandle = true && (isSetOperationHandle()); + list.add(present_operationHandle); + if (present_operationHandle) + list.add(operationHandle); + + return list.hashCode(); + } + + @Override + public int compareTo(TGetCrossReferenceResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationHandle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TGetCrossReferenceResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetOperationHandle()) { + if (!first) sb.append(", "); + sb.append("operationHandle:"); + if (this.operationHandle == null) { + sb.append("null"); + } else { + sb.append(this.operationHandle); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetStatus()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (status != null) { + status.validate(); + } + if (operationHandle != null) { + operationHandle.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TGetCrossReferenceRespStandardSchemeFactory implements SchemeFactory { + public TGetCrossReferenceRespStandardScheme getScheme() { + return new TGetCrossReferenceRespStandardScheme(); + } + } + + private static class TGetCrossReferenceRespStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCrossReferenceResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new TStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPERATION_HANDLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.operationHandle = new TOperationHandle(); + struct.operationHandle.read(iprot); + struct.setOperationHandleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TGetCrossReferenceResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.operationHandle != null) { + if (struct.isSetOperationHandle()) { + oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC); + struct.operationHandle.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TGetCrossReferenceRespTupleSchemeFactory implements SchemeFactory { + public TGetCrossReferenceRespTupleScheme getScheme() { + return new TGetCrossReferenceRespTupleScheme(); + } + } + + private static class TGetCrossReferenceRespTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceResp struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.status.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetOperationHandle()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetOperationHandle()) { + struct.operationHandle.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceResp struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.status = new TStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.operationHandle = new TOperationHandle(); + struct.operationHandle.read(iprot); + struct.setOperationHandleIsSet(true); + } + } + } + +} + diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java index 6c6bb00e43e43..e3e28c5860522 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetDelegationTokenReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -341,60 +345,60 @@ public boolean equals(TGetDelegationTokenReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_owner = true && (isSetOwner()); - builder.append(present_owner); + list.add(present_owner); if (present_owner) - builder.append(owner); + list.add(owner); boolean present_renewer = true && (isSetRenewer()); - builder.append(present_renewer); + list.add(present_renewer); if (present_renewer) - builder.append(renewer); + list.add(renewer); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetDelegationTokenReq typedOther = (TGetDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); if (lastComparison != 0) { return lastComparison; } if (isSetOwner()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRenewer()).compareTo(typedOther.isSetRenewer()); + lastComparison = Boolean.valueOf(isSetRenewer()).compareTo(other.isSetRenewer()); if (lastComparison != 0) { return lastComparison; } if (isSetRenewer()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer, typedOther.renewer); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer, other.renewer); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java index d14c5e029a35d..6ef2acbbd9435 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetDelegationTokenResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetDelegationTokenResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.DELEGATION_TOKEN}; + private static final _Fields optionals[] = {_Fields.DELEGATION_TOKEN}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetDelegationTokenResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_delegationToken = true && (isSetDelegationToken()); - builder.append(present_delegationToken); + list.add(present_delegationToken); if (present_delegationToken) - builder.append(delegationToken); + list.add(delegationToken); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetDelegationTokenResp typedOther = (TGetDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java similarity index 95% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java index ff45ee0386cb9..ad4f8a5b031e8 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetFunctionsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetFunctionsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetFunctionsReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -118,7 +122,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; + private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -396,75 +400,75 @@ public boolean equals(TGetFunctionsReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_catalogName = true && (isSetCatalogName()); - builder.append(present_catalogName); + list.add(present_catalogName); if (present_catalogName) - builder.append(catalogName); + list.add(catalogName); boolean present_schemaName = true && (isSetSchemaName()); - builder.append(present_schemaName); + list.add(present_schemaName); if (present_schemaName) - builder.append(schemaName); + list.add(schemaName); boolean present_functionName = true && (isSetFunctionName()); - builder.append(present_functionName); + list.add(present_functionName); if (present_functionName) - builder.append(functionName); + list.add(functionName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetFunctionsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetFunctionsReq typedOther = (TGetFunctionsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(typedOther.isSetFunctionName()); + lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName()); if (lastComparison != 0) { return lastComparison; } if (isSetFunctionName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, typedOther.functionName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java index 3adafdacb54ef..ead37fb91cc2f 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetFunctionsResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetFunctionsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetFunctionsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetFunctionsResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetFunctionsResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetFunctionsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetFunctionsResp typedOther = (TGetFunctionsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java index 0139bf04ec7db..b319b70e5eba5 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -295,45 +299,45 @@ public boolean equals(TGetInfoReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_infoType = true && (isSetInfoType()); - builder.append(present_infoType); + list.add(present_infoType); if (present_infoType) - builder.append(infoType.getValue()); + list.add(infoType.getValue()); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetInfoReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetInfoReq typedOther = (TGetInfoReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoType()).compareTo(typedOther.isSetInfoType()); + lastComparison = Boolean.valueOf(isSetInfoType()).compareTo(other.isSetInfoType()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoType, typedOther.infoType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoType, other.infoType); if (lastComparison != 0) { return lastComparison; } @@ -438,7 +442,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetInfoReq struct) break; case 2: // INFO_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.infoType = TGetInfoType.findByValue(iprot.readI32()); + struct.infoType = org.apache.hive.service.rpc.thrift.TGetInfoType.findByValue(iprot.readI32()); struct.setInfoTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -494,7 +498,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetInfoReq struct) struct.sessionHandle = new TSessionHandle(); struct.sessionHandle.read(iprot); struct.setSessionHandleIsSet(true); - struct.infoType = TGetInfoType.findByValue(iprot.readI32()); + struct.infoType = org.apache.hive.service.rpc.thrift.TGetInfoType.findByValue(iprot.readI32()); struct.setInfoTypeIsSet(true); } } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java index 2faaa9211b3ba..9be810b024987 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -283,45 +287,45 @@ public boolean equals(TGetInfoResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_infoValue = true && (isSetInfoValue()); - builder.append(present_infoValue); + list.add(present_infoValue); if (present_infoValue) - builder.append(infoValue); + list.add(infoValue); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetInfoResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetInfoResp typedOther = (TGetInfoResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoValue()).compareTo(typedOther.isSetInfoValue()); + lastComparison = Boolean.valueOf(isSetInfoValue()).compareTo(other.isSetInfoValue()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoValue, typedOther.infoValue); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoValue, other.infoValue); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoType.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java similarity index 98% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoType.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java index d9dd62414f001..5b219b62656d7 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoType.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoType.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java similarity index 96% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java index fe2a211c46309..8e3045a58e5ac 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetInfoValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetInfoValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.BitSet; import 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 TGetInfoValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoValue"); private static final org.apache.thrift.protocol.TField STRING_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("stringValue", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -285,6 +288,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip 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; } } @@ -558,19 +562,19 @@ public int compareTo(TGetInfoValue other) { @Override public int hashCode() { - HashCodeBuilder hcb = new HashCodeBuilder(); - hcb.append(this.getClass().getName()); + List list = new ArrayList(); + list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { - hcb.append(setField.getThriftFieldId()); + list.add(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { - hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { - hcb.append(value); + list.add(value); } } - return hcb.toHashCode(); + return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java similarity index 69% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java index b88591ea1945b..af31ce2b22819 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,13 +29,17 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField GET_PROGRESS_UPDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("getProgressUpdate", org.apache.thrift.protocol.TType.BOOL, (short)2); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -43,10 +48,12 @@ public class TGetOperationStatusReq implements org.apache.thrift.TBase byName = new HashMap(); @@ -63,6 +70,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // OPERATION_HANDLE return OPERATION_HANDLE; + case 2: // GET_PROGRESS_UPDATE + return GET_PROGRESS_UPDATE; default: return null; } @@ -103,11 +112,16 @@ public String getFieldName() { } // isset id assignments + private static final int __GETPROGRESSUPDATE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.GET_PROGRESS_UPDATE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.OPERATION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("operationHandle", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOperationHandle.class))); + tmpMap.put(_Fields.GET_PROGRESS_UPDATE, new org.apache.thrift.meta_data.FieldMetaData("getProgressUpdate", 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(TGetOperationStatusReq.class, metaDataMap); } @@ -126,9 +140,11 @@ public TGetOperationStatusReq( * Performs a deep copy on other. */ public TGetOperationStatusReq(TGetOperationStatusReq other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetOperationHandle()) { this.operationHandle = new TOperationHandle(other.operationHandle); } + this.getProgressUpdate = other.getProgressUpdate; } public TGetOperationStatusReq deepCopy() { @@ -138,6 +154,8 @@ public TGetOperationStatusReq deepCopy() { @Override public void clear() { this.operationHandle = null; + setGetProgressUpdateIsSet(false); + this.getProgressUpdate = false; } public TOperationHandle getOperationHandle() { @@ -163,6 +181,28 @@ public void setOperationHandleIsSet(boolean value) { } } + public boolean isGetProgressUpdate() { + return this.getProgressUpdate; + } + + public void setGetProgressUpdate(boolean getProgressUpdate) { + this.getProgressUpdate = getProgressUpdate; + setGetProgressUpdateIsSet(true); + } + + public void unsetGetProgressUpdate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GETPROGRESSUPDATE_ISSET_ID); + } + + /** Returns true if field getProgressUpdate is set (has been assigned a value) and false otherwise */ + public boolean isSetGetProgressUpdate() { + return EncodingUtils.testBit(__isset_bitfield, __GETPROGRESSUPDATE_ISSET_ID); + } + + public void setGetProgressUpdateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GETPROGRESSUPDATE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case OPERATION_HANDLE: @@ -173,6 +213,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case GET_PROGRESS_UPDATE: + if (value == null) { + unsetGetProgressUpdate(); + } else { + setGetProgressUpdate((Boolean)value); + } + break; + } } @@ -181,6 +229,9 @@ public Object getFieldValue(_Fields field) { case OPERATION_HANDLE: return getOperationHandle(); + case GET_PROGRESS_UPDATE: + return isGetProgressUpdate(); + } throw new IllegalStateException(); } @@ -194,6 +245,8 @@ public boolean isSet(_Fields field) { switch (field) { case OPERATION_HANDLE: return isSetOperationHandle(); + case GET_PROGRESS_UPDATE: + return isSetGetProgressUpdate(); } throw new IllegalStateException(); } @@ -220,35 +273,59 @@ public boolean equals(TGetOperationStatusReq that) { return false; } + boolean this_present_getProgressUpdate = true && this.isSetGetProgressUpdate(); + boolean that_present_getProgressUpdate = true && that.isSetGetProgressUpdate(); + if (this_present_getProgressUpdate || that_present_getProgressUpdate) { + if (!(this_present_getProgressUpdate && that_present_getProgressUpdate)) + return false; + if (this.getProgressUpdate != that.getProgressUpdate) + return false; + } + return true; } @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + boolean present_getProgressUpdate = true && (isSetGetProgressUpdate()); + list.add(present_getProgressUpdate); + if (present_getProgressUpdate) + list.add(getProgressUpdate); + + return list.hashCode(); } + @Override public int compareTo(TGetOperationStatusReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetOperationStatusReq typedOther = (TGetOperationStatusReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetGetProgressUpdate()).compareTo(other.isSetGetProgressUpdate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGetProgressUpdate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.getProgressUpdate, other.getProgressUpdate); if (lastComparison != 0) { return lastComparison; } @@ -280,6 +357,12 @@ public String toString() { sb.append(this.operationHandle); } first = false; + if (isSetGetProgressUpdate()) { + if (!first) sb.append(", "); + sb.append("getProgressUpdate:"); + sb.append(this.getProgressUpdate); + first = false; + } sb.append(")"); return sb.toString(); } @@ -306,6 +389,8 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // 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); @@ -339,6 +424,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 2: // GET_PROGRESS_UPDATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.getProgressUpdate = iprot.readBool(); + struct.setGetProgressUpdateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -357,6 +450,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatu struct.operationHandle.write(oprot); oprot.writeFieldEnd(); } + if (struct.isSetGetProgressUpdate()) { + oprot.writeFieldBegin(GET_PROGRESS_UPDATE_FIELD_DESC); + oprot.writeBool(struct.getProgressUpdate); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -375,6 +473,14 @@ private static class TGetOperationStatusReqTupleScheme extends TupleScheme, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetOperationStatusResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -39,6 +43,11 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -51,6 +60,11 @@ public class TGetOperationStatusResp implements org.apache.thrift.TBase byName = new HashMap(); @@ -87,6 +106,16 @@ public static _Fields findByThriftId(int fieldId) { return ERROR_CODE; case 5: // ERROR_MESSAGE return ERROR_MESSAGE; + case 6: // TASK_STATUS + return TASK_STATUS; + case 7: // OPERATION_STARTED + return OPERATION_STARTED; + case 8: // OPERATION_COMPLETED + return OPERATION_COMPLETED; + case 9: // HAS_RESULT_SET + return HAS_RESULT_SET; + case 10: // PROGRESS_UPDATE_RESPONSE + return PROGRESS_UPDATE_RESPONSE; default: return null; } @@ -128,8 +157,11 @@ public String getFieldName() { // isset id assignments private static final int __ERRORCODE_ISSET_ID = 0; + private static final int __OPERATIONSTARTED_ISSET_ID = 1; + private static final int __OPERATIONCOMPLETED_ISSET_ID = 2; + private static final int __HASRESULTSET_ISSET_ID = 3; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE}; + private static final _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED,_Fields.HAS_RESULT_SET,_Fields.PROGRESS_UPDATE_RESPONSE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -143,6 +175,16 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errorMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("taskStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OPERATION_STARTED, new org.apache.thrift.meta_data.FieldMetaData("operationStarted", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.OPERATION_COMPLETED, new org.apache.thrift.meta_data.FieldMetaData("operationCompleted", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.PROGRESS_UPDATE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("progressUpdateResponse", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TProgressUpdateResp"))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOperationStatusResp.class, metaDataMap); } @@ -175,6 +217,15 @@ public TGetOperationStatusResp(TGetOperationStatusResp other) { if (other.isSetErrorMessage()) { this.errorMessage = other.errorMessage; } + if (other.isSetTaskStatus()) { + this.taskStatus = other.taskStatus; + } + this.operationStarted = other.operationStarted; + this.operationCompleted = other.operationCompleted; + this.hasResultSet = other.hasResultSet; + if (other.isSetProgressUpdateResponse()) { + this.progressUpdateResponse = other.progressUpdateResponse; + } } public TGetOperationStatusResp deepCopy() { @@ -189,6 +240,14 @@ public void clear() { setErrorCodeIsSet(false); this.errorCode = 0; this.errorMessage = null; + this.taskStatus = null; + setOperationStartedIsSet(false); + this.operationStarted = 0; + setOperationCompletedIsSet(false); + this.operationCompleted = 0; + setHasResultSetIsSet(false); + this.hasResultSet = false; + this.progressUpdateResponse = null; } public TStatus getStatus() { @@ -313,6 +372,118 @@ public void setErrorMessageIsSet(boolean value) { } } + public String getTaskStatus() { + return this.taskStatus; + } + + public void setTaskStatus(String taskStatus) { + this.taskStatus = taskStatus; + } + + public void unsetTaskStatus() { + this.taskStatus = null; + } + + /** Returns true if field taskStatus is set (has been assigned a value) and false otherwise */ + public boolean isSetTaskStatus() { + return this.taskStatus != null; + } + + public void setTaskStatusIsSet(boolean value) { + if (!value) { + this.taskStatus = null; + } + } + + public long getOperationStarted() { + return this.operationStarted; + } + + public void setOperationStarted(long operationStarted) { + this.operationStarted = operationStarted; + setOperationStartedIsSet(true); + } + + public void unsetOperationStarted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID); + } + + /** Returns true if field operationStarted is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationStarted() { + return EncodingUtils.testBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID); + } + + public void setOperationStartedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID, value); + } + + public long getOperationCompleted() { + return this.operationCompleted; + } + + public void setOperationCompleted(long operationCompleted) { + this.operationCompleted = operationCompleted; + setOperationCompletedIsSet(true); + } + + public void unsetOperationCompleted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID); + } + + /** Returns true if field operationCompleted is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationCompleted() { + return EncodingUtils.testBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID); + } + + public void setOperationCompletedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID, value); + } + + public boolean isHasResultSet() { + return this.hasResultSet; + } + + public void setHasResultSet(boolean hasResultSet) { + this.hasResultSet = hasResultSet; + setHasResultSetIsSet(true); + } + + public void unsetHasResultSet() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); + } + + /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */ + public boolean isSetHasResultSet() { + return EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID); + } + + public void setHasResultSetIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value); + } + + public TProgressUpdateResp getProgressUpdateResponse() { + return this.progressUpdateResponse; + } + + public void setProgressUpdateResponse(TProgressUpdateResp progressUpdateResponse) { + this.progressUpdateResponse = progressUpdateResponse; + } + + public void unsetProgressUpdateResponse() { + this.progressUpdateResponse = null; + } + + /** Returns true if field progressUpdateResponse is set (has been assigned a value) and false otherwise */ + public boolean isSetProgressUpdateResponse() { + return this.progressUpdateResponse != null; + } + + public void setProgressUpdateResponseIsSet(boolean value) { + if (!value) { + this.progressUpdateResponse = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case STATUS: @@ -355,6 +526,46 @@ public void setFieldValue(_Fields field, Object value) { } break; + case TASK_STATUS: + if (value == null) { + unsetTaskStatus(); + } else { + setTaskStatus((String)value); + } + break; + + case OPERATION_STARTED: + if (value == null) { + unsetOperationStarted(); + } else { + setOperationStarted((Long)value); + } + break; + + case OPERATION_COMPLETED: + if (value == null) { + unsetOperationCompleted(); + } else { + setOperationCompleted((Long)value); + } + break; + + case HAS_RESULT_SET: + if (value == null) { + unsetHasResultSet(); + } else { + setHasResultSet((Boolean)value); + } + break; + + case PROGRESS_UPDATE_RESPONSE: + if (value == null) { + unsetProgressUpdateResponse(); + } else { + setProgressUpdateResponse((TProgressUpdateResp)value); + } + break; + } } @@ -370,11 +581,26 @@ public Object getFieldValue(_Fields field) { return getSqlState(); case ERROR_CODE: - return Integer.valueOf(getErrorCode()); + return getErrorCode(); case ERROR_MESSAGE: return getErrorMessage(); + case TASK_STATUS: + return getTaskStatus(); + + case OPERATION_STARTED: + return getOperationStarted(); + + case OPERATION_COMPLETED: + return getOperationCompleted(); + + case HAS_RESULT_SET: + return isHasResultSet(); + + case PROGRESS_UPDATE_RESPONSE: + return getProgressUpdateResponse(); + } throw new IllegalStateException(); } @@ -396,6 +622,16 @@ public boolean isSet(_Fields field) { return isSetErrorCode(); case ERROR_MESSAGE: return isSetErrorMessage(); + case TASK_STATUS: + return isSetTaskStatus(); + case OPERATION_STARTED: + return isSetOperationStarted(); + case OPERATION_COMPLETED: + return isSetOperationCompleted(); + case HAS_RESULT_SET: + return isSetHasResultSet(); + case PROGRESS_UPDATE_RESPONSE: + return isSetProgressUpdateResponse(); } throw new IllegalStateException(); } @@ -458,95 +694,215 @@ public boolean equals(TGetOperationStatusResp that) { return false; } + boolean this_present_taskStatus = true && this.isSetTaskStatus(); + boolean that_present_taskStatus = true && that.isSetTaskStatus(); + if (this_present_taskStatus || that_present_taskStatus) { + if (!(this_present_taskStatus && that_present_taskStatus)) + return false; + if (!this.taskStatus.equals(that.taskStatus)) + return false; + } + + boolean this_present_operationStarted = true && this.isSetOperationStarted(); + boolean that_present_operationStarted = true && that.isSetOperationStarted(); + if (this_present_operationStarted || that_present_operationStarted) { + if (!(this_present_operationStarted && that_present_operationStarted)) + return false; + if (this.operationStarted != that.operationStarted) + return false; + } + + boolean this_present_operationCompleted = true && this.isSetOperationCompleted(); + boolean that_present_operationCompleted = true && that.isSetOperationCompleted(); + if (this_present_operationCompleted || that_present_operationCompleted) { + if (!(this_present_operationCompleted && that_present_operationCompleted)) + return false; + if (this.operationCompleted != that.operationCompleted) + return false; + } + + boolean this_present_hasResultSet = true && this.isSetHasResultSet(); + boolean that_present_hasResultSet = true && that.isSetHasResultSet(); + if (this_present_hasResultSet || that_present_hasResultSet) { + if (!(this_present_hasResultSet && that_present_hasResultSet)) + return false; + if (this.hasResultSet != that.hasResultSet) + return false; + } + + boolean this_present_progressUpdateResponse = true && this.isSetProgressUpdateResponse(); + boolean that_present_progressUpdateResponse = true && that.isSetProgressUpdateResponse(); + if (this_present_progressUpdateResponse || that_present_progressUpdateResponse) { + if (!(this_present_progressUpdateResponse && that_present_progressUpdateResponse)) + return false; + if (!this.progressUpdateResponse.equals(that.progressUpdateResponse)) + return false; + } + return true; } @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationState = true && (isSetOperationState()); - builder.append(present_operationState); + list.add(present_operationState); if (present_operationState) - builder.append(operationState.getValue()); + list.add(operationState.getValue()); boolean present_sqlState = true && (isSetSqlState()); - builder.append(present_sqlState); + list.add(present_sqlState); if (present_sqlState) - builder.append(sqlState); + list.add(sqlState); boolean present_errorCode = true && (isSetErrorCode()); - builder.append(present_errorCode); + list.add(present_errorCode); if (present_errorCode) - builder.append(errorCode); + list.add(errorCode); boolean present_errorMessage = true && (isSetErrorMessage()); - builder.append(present_errorMessage); + list.add(present_errorMessage); if (present_errorMessage) - builder.append(errorMessage); - - return builder.toHashCode(); + list.add(errorMessage); + + boolean present_taskStatus = true && (isSetTaskStatus()); + list.add(present_taskStatus); + if (present_taskStatus) + list.add(taskStatus); + + boolean present_operationStarted = true && (isSetOperationStarted()); + list.add(present_operationStarted); + if (present_operationStarted) + list.add(operationStarted); + + boolean present_operationCompleted = true && (isSetOperationCompleted()); + list.add(present_operationCompleted); + if (present_operationCompleted) + list.add(operationCompleted); + + boolean present_hasResultSet = true && (isSetHasResultSet()); + list.add(present_hasResultSet); + if (present_hasResultSet) + list.add(hasResultSet); + + boolean present_progressUpdateResponse = true && (isSetProgressUpdateResponse()); + list.add(present_progressUpdateResponse); + if (present_progressUpdateResponse) + list.add(progressUpdateResponse); + + return list.hashCode(); } + @Override public int compareTo(TGetOperationStatusResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetOperationStatusResp typedOther = (TGetOperationStatusResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(typedOther.isSetOperationState()); + lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(other.isSetOperationState()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, typedOther.operationState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, other.operationState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(typedOther.isSetSqlState()); + lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState()); if (lastComparison != 0) { return lastComparison; } if (isSetSqlState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, typedOther.sqlState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(typedOther.isSetErrorMessage()); + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, typedOther.errorMessage); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(other.isSetTaskStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, other.taskStatus); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationStarted()).compareTo(other.isSetOperationStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationStarted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationStarted, other.operationStarted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationCompleted()).compareTo(other.isSetOperationCompleted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationCompleted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationCompleted, other.operationCompleted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHasResultSet()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProgressUpdateResponse()).compareTo(other.isSetProgressUpdateResponse()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProgressUpdateResponse()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progressUpdateResponse, other.progressUpdateResponse); if (lastComparison != 0) { return lastComparison; } @@ -614,6 +970,44 @@ public String toString() { } first = false; } + if (isSetTaskStatus()) { + if (!first) sb.append(", "); + sb.append("taskStatus:"); + if (this.taskStatus == null) { + sb.append("null"); + } else { + sb.append(this.taskStatus); + } + first = false; + } + if (isSetOperationStarted()) { + if (!first) sb.append(", "); + sb.append("operationStarted:"); + sb.append(this.operationStarted); + first = false; + } + if (isSetOperationCompleted()) { + if (!first) sb.append(", "); + sb.append("operationCompleted:"); + sb.append(this.operationCompleted); + first = false; + } + if (isSetHasResultSet()) { + if (!first) sb.append(", "); + sb.append("hasResultSet:"); + sb.append(this.hasResultSet); + first = false; + } + if (isSetProgressUpdateResponse()) { + if (!first) sb.append(", "); + sb.append("progressUpdateResponse:"); + if (this.progressUpdateResponse == null) { + sb.append("null"); + } else { + sb.append(this.progressUpdateResponse); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -677,7 +1071,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus break; case 2: // OPERATION_STATE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operationState = TOperationState.findByValue(iprot.readI32()); + struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32()); struct.setOperationStateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -707,6 +1101,47 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 6: // TASK_STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.taskStatus = iprot.readString(); + struct.setTaskStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // OPERATION_STARTED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.operationStarted = iprot.readI64(); + struct.setOperationStartedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // OPERATION_COMPLETED + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.operationCompleted = iprot.readI64(); + struct.setOperationCompletedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // HAS_RESULT_SET + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.hasResultSet = iprot.readBool(); + struct.setHasResultSetIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // PROGRESS_UPDATE_RESPONSE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.progressUpdateResponse = new TProgressUpdateResp(); + struct.progressUpdateResponse.read(iprot); + struct.setProgressUpdateResponseIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -751,6 +1186,35 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatu oprot.writeFieldEnd(); } } + if (struct.taskStatus != null) { + if (struct.isSetTaskStatus()) { + oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC); + oprot.writeString(struct.taskStatus); + oprot.writeFieldEnd(); + } + } + if (struct.isSetOperationStarted()) { + oprot.writeFieldBegin(OPERATION_STARTED_FIELD_DESC); + oprot.writeI64(struct.operationStarted); + oprot.writeFieldEnd(); + } + if (struct.isSetOperationCompleted()) { + oprot.writeFieldBegin(OPERATION_COMPLETED_FIELD_DESC); + oprot.writeI64(struct.operationCompleted); + oprot.writeFieldEnd(); + } + if (struct.isSetHasResultSet()) { + oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC); + oprot.writeBool(struct.hasResultSet); + oprot.writeFieldEnd(); + } + if (struct.progressUpdateResponse != null) { + if (struct.isSetProgressUpdateResponse()) { + oprot.writeFieldBegin(PROGRESS_UPDATE_RESPONSE_FIELD_DESC); + struct.progressUpdateResponse.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -782,7 +1246,22 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatus if (struct.isSetErrorMessage()) { optionals.set(3); } - oprot.writeBitSet(optionals, 4); + if (struct.isSetTaskStatus()) { + optionals.set(4); + } + if (struct.isSetOperationStarted()) { + optionals.set(5); + } + if (struct.isSetOperationCompleted()) { + optionals.set(6); + } + if (struct.isSetHasResultSet()) { + optionals.set(7); + } + if (struct.isSetProgressUpdateResponse()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); if (struct.isSetOperationState()) { oprot.writeI32(struct.operationState.getValue()); } @@ -795,6 +1274,21 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatus if (struct.isSetErrorMessage()) { oprot.writeString(struct.errorMessage); } + if (struct.isSetTaskStatus()) { + oprot.writeString(struct.taskStatus); + } + if (struct.isSetOperationStarted()) { + oprot.writeI64(struct.operationStarted); + } + if (struct.isSetOperationCompleted()) { + oprot.writeI64(struct.operationCompleted); + } + if (struct.isSetHasResultSet()) { + oprot.writeBool(struct.hasResultSet); + } + if (struct.isSetProgressUpdateResponse()) { + struct.progressUpdateResponse.write(oprot); + } } @Override @@ -803,9 +1297,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusR struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); - BitSet incoming = iprot.readBitSet(4); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { - struct.operationState = TOperationState.findByValue(iprot.readI32()); + struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32()); struct.setOperationStateIsSet(true); } if (incoming.get(1)) { @@ -820,6 +1314,27 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusR struct.errorMessage = iprot.readString(); struct.setErrorMessageIsSet(true); } + if (incoming.get(4)) { + struct.taskStatus = iprot.readString(); + struct.setTaskStatusIsSet(true); + } + if (incoming.get(5)) { + struct.operationStarted = iprot.readI64(); + struct.setOperationStartedIsSet(true); + } + if (incoming.get(6)) { + struct.operationCompleted = iprot.readI64(); + struct.setOperationCompletedIsSet(true); + } + if (incoming.get(7)) { + struct.hasResultSet = iprot.readBool(); + struct.setHasResultSetIsSet(true); + } + if (incoming.get(8)) { + struct.progressUpdateResponse = new TProgressUpdateResp(); + struct.progressUpdateResponse.read(iprot); + struct.setProgressUpdateResponseIsSet(true); + } } } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java new file mode 100644 index 0000000000000..1bec9b51c72d8 --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java @@ -0,0 +1,716 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetPrimaryKeysReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetPrimaryKeysReq"); + + private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("schemaName", 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TGetPrimaryKeysReqStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TGetPrimaryKeysReqTupleSchemeFactory()); + } + + private TSessionHandle sessionHandle; // required + private String catalogName; // optional + private String schemaName; // optional + private String tableName; // 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 { + SESSION_HANDLE((short)1, "sessionHandle"), + CATALOG_NAME((short)2, "catalogName"), + SCHEMA_NAME((short)3, "schemaName"), + TABLE_NAME((short)4, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SESSION_HANDLE + return SESSION_HANDLE; + case 2: // CATALOG_NAME + return CATALOG_NAME; + case 3: // SCHEMA_NAME + return SCHEMA_NAME; + case 4: // 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 + private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class))); + tmpMap.put(_Fields.CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("catalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + tmpMap.put(_Fields.SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("schemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier"))); + 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 , "TIdentifier"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetPrimaryKeysReq.class, metaDataMap); + } + + public TGetPrimaryKeysReq() { + } + + public TGetPrimaryKeysReq( + TSessionHandle sessionHandle) + { + this(); + this.sessionHandle = sessionHandle; + } + + /** + * Performs a deep copy on other. + */ + public TGetPrimaryKeysReq(TGetPrimaryKeysReq other) { + if (other.isSetSessionHandle()) { + this.sessionHandle = new TSessionHandle(other.sessionHandle); + } + if (other.isSetCatalogName()) { + this.catalogName = other.catalogName; + } + if (other.isSetSchemaName()) { + this.schemaName = other.schemaName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public TGetPrimaryKeysReq deepCopy() { + return new TGetPrimaryKeysReq(this); + } + + @Override + public void clear() { + this.sessionHandle = null; + this.catalogName = null; + this.schemaName = null; + this.tableName = null; + } + + public TSessionHandle getSessionHandle() { + return this.sessionHandle; + } + + public void setSessionHandle(TSessionHandle sessionHandle) { + this.sessionHandle = sessionHandle; + } + + public void unsetSessionHandle() { + this.sessionHandle = null; + } + + /** Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */ + public boolean isSetSessionHandle() { + return this.sessionHandle != null; + } + + public void setSessionHandleIsSet(boolean value) { + if (!value) { + this.sessionHandle = null; + } + } + + public String getCatalogName() { + return this.catalogName; + } + + public void setCatalogName(String catalogName) { + this.catalogName = catalogName; + } + + public void unsetCatalogName() { + this.catalogName = null; + } + + /** Returns true if field catalogName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatalogName() { + return this.catalogName != null; + } + + public void setCatalogNameIsSet(boolean value) { + if (!value) { + this.catalogName = null; + } + } + + public String getSchemaName() { + return this.schemaName; + } + + public void setSchemaName(String schemaName) { + this.schemaName = schemaName; + } + + public void unsetSchemaName() { + this.schemaName = null; + } + + /** Returns true if field schemaName is set (has been assigned a value) and false otherwise */ + public boolean isSetSchemaName() { + return this.schemaName != null; + } + + public void setSchemaNameIsSet(boolean value) { + if (!value) { + this.schemaName = 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case SESSION_HANDLE: + if (value == null) { + unsetSessionHandle(); + } else { + setSessionHandle((TSessionHandle)value); + } + break; + + case CATALOG_NAME: + if (value == null) { + unsetCatalogName(); + } else { + setCatalogName((String)value); + } + break; + + case SCHEMA_NAME: + if (value == null) { + unsetSchemaName(); + } else { + setSchemaName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SESSION_HANDLE: + return getSessionHandle(); + + case CATALOG_NAME: + return getCatalogName(); + + case SCHEMA_NAME: + return getSchemaName(); + + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SESSION_HANDLE: + return isSetSessionHandle(); + case CATALOG_NAME: + return isSetCatalogName(); + case SCHEMA_NAME: + return isSetSchemaName(); + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TGetPrimaryKeysReq) + return this.equals((TGetPrimaryKeysReq)that); + return false; + } + + public boolean equals(TGetPrimaryKeysReq that) { + if (that == null) + return false; + + boolean this_present_sessionHandle = true && this.isSetSessionHandle(); + boolean that_present_sessionHandle = true && that.isSetSessionHandle(); + if (this_present_sessionHandle || that_present_sessionHandle) { + if (!(this_present_sessionHandle && that_present_sessionHandle)) + return false; + if (!this.sessionHandle.equals(that.sessionHandle)) + return false; + } + + boolean this_present_catalogName = true && this.isSetCatalogName(); + boolean that_present_catalogName = true && that.isSetCatalogName(); + if (this_present_catalogName || that_present_catalogName) { + if (!(this_present_catalogName && that_present_catalogName)) + return false; + if (!this.catalogName.equals(that.catalogName)) + return false; + } + + boolean this_present_schemaName = true && this.isSetSchemaName(); + boolean that_present_schemaName = true && that.isSetSchemaName(); + if (this_present_schemaName || that_present_schemaName) { + if (!(this_present_schemaName && that_present_schemaName)) + return false; + if (!this.schemaName.equals(that.schemaName)) + 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; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_sessionHandle = true && (isSetSessionHandle()); + list.add(present_sessionHandle); + if (present_sessionHandle) + list.add(sessionHandle); + + boolean present_catalogName = true && (isSetCatalogName()); + list.add(present_catalogName); + if (present_catalogName) + list.add(catalogName); + + boolean present_schemaName = true && (isSetSchemaName()); + list.add(present_schemaName); + if (present_schemaName) + list.add(schemaName); + + boolean present_tableName = true && (isSetTableName()); + list.add(present_tableName); + if (present_tableName) + list.add(tableName); + + return list.hashCode(); + } + + @Override + public int compareTo(TGetPrimaryKeysReq other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSessionHandle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatalogName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSchemaName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + 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; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TGetPrimaryKeysReq("); + boolean first = true; + + sb.append("sessionHandle:"); + if (this.sessionHandle == null) { + sb.append("null"); + } else { + sb.append(this.sessionHandle); + } + first = false; + if (isSetCatalogName()) { + if (!first) sb.append(", "); + sb.append("catalogName:"); + if (this.catalogName == null) { + sb.append("null"); + } else { + sb.append(this.catalogName); + } + first = false; + } + if (isSetSchemaName()) { + if (!first) sb.append(", "); + sb.append("schemaName:"); + if (this.schemaName == null) { + sb.append("null"); + } else { + sb.append(this.schemaName); + } + 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; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetSessionHandle()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (sessionHandle != null) { + sessionHandle.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TGetPrimaryKeysReqStandardSchemeFactory implements SchemeFactory { + public TGetPrimaryKeysReqStandardScheme getScheme() { + return new TGetPrimaryKeysReqStandardScheme(); + } + } + + private static class TGetPrimaryKeysReqStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SESSION_HANDLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.sessionHandle = new TSessionHandle(); + struct.sessionHandle.read(iprot); + struct.setSessionHandleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CATALOG_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catalogName = iprot.readString(); + struct.setCatalogNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // SCHEMA_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.schemaName = iprot.readString(); + struct.setSchemaNameIsSet(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; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.sessionHandle != null) { + oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC); + struct.sessionHandle.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.catalogName != null) { + if (struct.isSetCatalogName()) { + oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC); + oprot.writeString(struct.catalogName); + oprot.writeFieldEnd(); + } + } + if (struct.schemaName != null) { + if (struct.isSetSchemaName()) { + oprot.writeFieldBegin(SCHEMA_NAME_FIELD_DESC); + oprot.writeString(struct.schemaName); + oprot.writeFieldEnd(); + } + } + if (struct.tableName != null) { + if (struct.isSetTableName()) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(struct.tableName); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TGetPrimaryKeysReqTupleSchemeFactory implements SchemeFactory { + public TGetPrimaryKeysReqTupleScheme getScheme() { + return new TGetPrimaryKeysReqTupleScheme(); + } + } + + private static class TGetPrimaryKeysReqTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.sessionHandle.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetCatalogName()) { + optionals.set(0); + } + if (struct.isSetSchemaName()) { + optionals.set(1); + } + if (struct.isSetTableName()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetCatalogName()) { + oprot.writeString(struct.catalogName); + } + if (struct.isSetSchemaName()) { + oprot.writeString(struct.schemaName); + } + if (struct.isSetTableName()) { + oprot.writeString(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.sessionHandle = new TSessionHandle(); + struct.sessionHandle.read(iprot); + struct.setSessionHandleIsSet(true); + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.catalogName = iprot.readString(); + struct.setCatalogNameIsSet(true); + } + if (incoming.get(1)) { + struct.schemaName = iprot.readString(); + struct.setSchemaNameIsSet(true); + } + if (incoming.get(2)) { + struct.tableName = iprot.readString(); + struct.setTableNameIsSet(true); + } + } + } + +} + diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java new file mode 100644 index 0000000000000..72d9507fe1031 --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java @@ -0,0 +1,509 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetPrimaryKeysResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetPrimaryKeysResp"); + + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TGetPrimaryKeysRespStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TGetPrimaryKeysRespTupleSchemeFactory()); + } + + private TStatus status; // required + private TOperationHandle operationHandle; // 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 { + STATUS((short)1, "status"), + OPERATION_HANDLE((short)2, "operationHandle"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATUS + return STATUS; + case 2: // OPERATION_HANDLE + return OPERATION_HANDLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(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.OPERATION_HANDLE}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStatus.class))); + tmpMap.put(_Fields.OPERATION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("operationHandle", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOperationHandle.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetPrimaryKeysResp.class, metaDataMap); + } + + public TGetPrimaryKeysResp() { + } + + public TGetPrimaryKeysResp( + TStatus status) + { + this(); + this.status = status; + } + + /** + * Performs a deep copy on other. + */ + public TGetPrimaryKeysResp(TGetPrimaryKeysResp other) { + if (other.isSetStatus()) { + this.status = new TStatus(other.status); + } + if (other.isSetOperationHandle()) { + this.operationHandle = new TOperationHandle(other.operationHandle); + } + } + + public TGetPrimaryKeysResp deepCopy() { + return new TGetPrimaryKeysResp(this); + } + + @Override + public void clear() { + this.status = null; + this.operationHandle = null; + } + + public TStatus getStatus() { + return this.status; + } + + public void setStatus(TStatus status) { + this.status = status; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public TOperationHandle getOperationHandle() { + return this.operationHandle; + } + + public void setOperationHandle(TOperationHandle operationHandle) { + this.operationHandle = operationHandle; + } + + public void unsetOperationHandle() { + this.operationHandle = null; + } + + /** Returns true if field operationHandle is set (has been assigned a value) and false otherwise */ + public boolean isSetOperationHandle() { + return this.operationHandle != null; + } + + public void setOperationHandleIsSet(boolean value) { + if (!value) { + this.operationHandle = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((TStatus)value); + } + break; + + case OPERATION_HANDLE: + if (value == null) { + unsetOperationHandle(); + } else { + setOperationHandle((TOperationHandle)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATUS: + return getStatus(); + + case OPERATION_HANDLE: + return getOperationHandle(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATUS: + return isSetStatus(); + case OPERATION_HANDLE: + return isSetOperationHandle(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TGetPrimaryKeysResp) + return this.equals((TGetPrimaryKeysResp)that); + return false; + } + + public boolean equals(TGetPrimaryKeysResp that) { + if (that == null) + return false; + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_operationHandle = true && this.isSetOperationHandle(); + boolean that_present_operationHandle = true && that.isSetOperationHandle(); + if (this_present_operationHandle || that_present_operationHandle) { + if (!(this_present_operationHandle && that_present_operationHandle)) + return false; + if (!this.operationHandle.equals(that.operationHandle)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_status = true && (isSetStatus()); + list.add(present_status); + if (present_status) + list.add(status); + + boolean present_operationHandle = true && (isSetOperationHandle()); + list.add(present_operationHandle); + if (present_operationHandle) + list.add(operationHandle); + + return list.hashCode(); + } + + @Override + public int compareTo(TGetPrimaryKeysResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperationHandle()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TGetPrimaryKeysResp("); + boolean first = true; + + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (isSetOperationHandle()) { + if (!first) sb.append(", "); + sb.append("operationHandle:"); + if (this.operationHandle == null) { + sb.append("null"); + } else { + sb.append(this.operationHandle); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetStatus()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (status != null) { + status.validate(); + } + if (operationHandle != null) { + operationHandle.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TGetPrimaryKeysRespStandardSchemeFactory implements SchemeFactory { + public TGetPrimaryKeysRespStandardScheme getScheme() { + return new TGetPrimaryKeysRespStandardScheme(); + } + } + + private static class TGetPrimaryKeysRespStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TGetPrimaryKeysResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.status = new TStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // OPERATION_HANDLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.operationHandle = new TOperationHandle(); + struct.operationHandle.read(iprot); + struct.setOperationHandleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TGetPrimaryKeysResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + struct.status.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.operationHandle != null) { + if (struct.isSetOperationHandle()) { + oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC); + struct.operationHandle.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TGetPrimaryKeysRespTupleSchemeFactory implements SchemeFactory { + public TGetPrimaryKeysRespTupleScheme getScheme() { + return new TGetPrimaryKeysRespTupleScheme(); + } + } + + private static class TGetPrimaryKeysRespTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysResp struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.status.write(oprot); + BitSet optionals = new BitSet(); + if (struct.isSetOperationHandle()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetOperationHandle()) { + struct.operationHandle.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysResp struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.status = new TStatus(); + struct.status.read(iprot); + struct.setStatusIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.operationHandle = new TOperationHandle(); + struct.operationHandle.read(iprot); + struct.setOperationHandleIsSet(true); + } + } + } + +} + diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java index 3bf363c958468..b94d827de264d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetResultSetMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetResultSetMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TGetResultSetMetadataReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetResultSetMetadataReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetResultSetMetadataReq typedOther = (TGetResultSetMetadataReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java index a9bef9f722c16..ae2021ebd5a10 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetResultSetMetadataResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetResultSetMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetResultSetMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.SCHEMA}; + private static final _Fields optionals[] = {_Fields.SCHEMA}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetResultSetMetadataResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_schema = true && (isSetSchema()); - builder.append(present_schema); + list.add(present_schema); if (present_schema) - builder.append(schema); + list.add(schema); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetResultSetMetadataResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetResultSetMetadataResp typedOther = (TGetResultSetMetadataResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchema()).compareTo(typedOther.isSetSchema()); + lastComparison = Boolean.valueOf(isSetSchema()).compareTo(other.isSetSchema()); if (lastComparison != 0) { return lastComparison; } if (isSetSchema()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, typedOther.schema); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java similarity index 95% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java index c2aadaa49a1e9..17eed87ae096f 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetSchemasReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetSchemasReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSchemasReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -113,7 +117,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; + private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -338,60 +342,60 @@ public boolean equals(TGetSchemasReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_catalogName = true && (isSetCatalogName()); - builder.append(present_catalogName); + list.add(present_catalogName); if (present_catalogName) - builder.append(catalogName); + list.add(catalogName); boolean present_schemaName = true && (isSetSchemaName()); - builder.append(present_schemaName); + list.add(present_schemaName); if (present_schemaName) - builder.append(schemaName); + list.add(schemaName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetSchemasReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetSchemasReq typedOther = (TGetSchemasReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java index ac1ea3e7cc7af..e5317f7ff5046 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetSchemasResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetSchemasResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetSchemasResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSchemasResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetSchemasResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetSchemasResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetSchemasResp typedOther = (TGetSchemasResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java index 6f2c713e0be6a..c027748a336e6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTableTypesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTableTypesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTableTypesReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TGetTableTypesReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTableTypesReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTableTypesReq typedOther = (TGetTableTypesReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java index 6f33fbcf5dadc..c6ce0d4368fdd 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTableTypesResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTableTypesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTableTypesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTableTypesResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetTableTypesResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTableTypesResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTableTypesResp typedOther = (TGetTableTypesResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java index c973fcc24cb10..1aa3f946727b6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTablesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTablesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTablesReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -123,7 +127,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.TABLE_TYPES}; + private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.TABLE_TYPES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -169,10 +173,7 @@ public TGetTablesReq(TGetTablesReq other) { this.tableName = other.tableName; } if (other.isSetTableTypes()) { - List __this__tableTypes = new ArrayList(); - for (String other_element : other.tableTypes) { - __this__tableTypes.add(other_element); - } + List __this__tableTypes = new ArrayList(other.tableTypes); this.tableTypes = __this__tableTypes; } } @@ -470,90 +471,90 @@ public boolean equals(TGetTablesReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_catalogName = true && (isSetCatalogName()); - builder.append(present_catalogName); + list.add(present_catalogName); if (present_catalogName) - builder.append(catalogName); + list.add(catalogName); boolean present_schemaName = true && (isSetSchemaName()); - builder.append(present_schemaName); + list.add(present_schemaName); if (present_schemaName) - builder.append(schemaName); + list.add(schemaName); boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); + list.add(present_tableName); if (present_tableName) - builder.append(tableName); + list.add(tableName); boolean present_tableTypes = true && (isSetTableTypes()); - builder.append(present_tableTypes); + list.add(present_tableTypes); if (present_tableTypes) - builder.append(tableTypes); + list.add(tableTypes); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTablesReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTablesReq typedOther = (TGetTablesReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableTypes()).compareTo(typedOther.isSetTableTypes()); + lastComparison = Boolean.valueOf(isSetTableTypes()).compareTo(other.isSetTableTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetTableTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableTypes, typedOther.tableTypes); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableTypes, other.tableTypes); if (lastComparison != 0) { return lastComparison; } @@ -713,11 +714,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTablesReq struc { org.apache.thrift.protocol.TList _list172 = iprot.readListBegin(); struct.tableTypes = new ArrayList(_list172.size); - for (int _i173 = 0; _i173 < _list172.size; ++_i173) + String _elem173; + for (int _i174 = 0; _i174 < _list172.size; ++_i174) { - String _elem174; // optional - _elem174 = iprot.readString(); - struct.tableTypes.add(_elem174); + _elem173 = iprot.readString(); + struct.tableTypes.add(_elem173); } iprot.readListEnd(); } @@ -854,11 +855,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetTablesReq struct { org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tableTypes = new ArrayList(_list177.size); - for (int _i178 = 0; _i178 < _list177.size; ++_i178) + String _elem178; + for (int _i179 = 0; _i179 < _list177.size; ++_i179) { - String _elem179; // optional - _elem179 = iprot.readString(); - struct.tableTypes.add(_elem179); + _elem178 = iprot.readString(); + struct.tableTypes.add(_elem178); } } struct.setTableTypesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java index d526f4478a24e..0b7c3825d35a5 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTablesResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTablesResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTablesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTablesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTablesResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetTablesResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTablesResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTablesResp typedOther = (TGetTablesResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java index d40115e83ec45..2e0ec60e4bc3d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTypeInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTypeInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTypeInfoReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TGetTypeInfoReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTypeInfoReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTypeInfoReq typedOther = (TGetTypeInfoReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java index 59be1a33b55e2..cc2910ef29feb 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TGetTypeInfoResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TGetTypeInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TGetTypeInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTypeInfoResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -108,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -282,45 +286,45 @@ public boolean equals(TGetTypeInfoResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_operationHandle = true && (isSetOperationHandle()); - builder.append(present_operationHandle); + list.add(present_operationHandle); if (present_operationHandle) - builder.append(operationHandle); + list.add(operationHandle); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TGetTypeInfoResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TGetTypeInfoResp typedOther = (TGetTypeInfoResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/THandleIdentifier.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java similarity index 91% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/THandleIdentifier.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java index 368273c341c7b..a3879d830000b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/THandleIdentifier.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/THandleIdentifier.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class THandleIdentifier implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class THandleIdentifier implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THandleIdentifier"); private static final org.apache.thrift.protocol.TField GUID_FIELD_DESC = new org.apache.thrift.protocol.TField("guid", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -127,8 +131,8 @@ public THandleIdentifier( ByteBuffer secret) { this(); - this.guid = guid; - this.secret = secret; + this.guid = org.apache.thrift.TBaseHelper.copyBinary(guid); + this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret); } /** @@ -137,11 +141,9 @@ public THandleIdentifier( public THandleIdentifier(THandleIdentifier other) { if (other.isSetGuid()) { this.guid = org.apache.thrift.TBaseHelper.copyBinary(other.guid); -; } if (other.isSetSecret()) { this.secret = org.apache.thrift.TBaseHelper.copyBinary(other.secret); -; } } @@ -161,15 +163,15 @@ public byte[] getGuid() { } public ByteBuffer bufferForGuid() { - return guid; + return org.apache.thrift.TBaseHelper.copyBinary(guid); } public void setGuid(byte[] guid) { - setGuid(guid == null ? (ByteBuffer)null : ByteBuffer.wrap(guid)); + this.guid = guid == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(guid, guid.length)); } public void setGuid(ByteBuffer guid) { - this.guid = guid; + this.guid = org.apache.thrift.TBaseHelper.copyBinary(guid); } public void unsetGuid() { @@ -193,15 +195,15 @@ public byte[] getSecret() { } public ByteBuffer bufferForSecret() { - return secret; + return org.apache.thrift.TBaseHelper.copyBinary(secret); } public void setSecret(byte[] secret) { - setSecret(secret == null ? (ByteBuffer)null : ByteBuffer.wrap(secret)); + this.secret = secret == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(secret, secret.length)); } public void setSecret(ByteBuffer secret) { - this.secret = secret; + this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret); } public void unsetSecret() { @@ -303,45 +305,45 @@ public boolean equals(THandleIdentifier that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_guid = true && (isSetGuid()); - builder.append(present_guid); + list.add(present_guid); if (present_guid) - builder.append(guid); + list.add(guid); boolean present_secret = true && (isSetSecret()); - builder.append(present_secret); + list.add(present_secret); if (present_secret) - builder.append(secret); + list.add(secret); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(THandleIdentifier other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - THandleIdentifier typedOther = (THandleIdentifier)other; - lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid()); + lastComparison = Boolean.valueOf(isSetGuid()).compareTo(other.isSetGuid()); if (lastComparison != 0) { return lastComparison; } if (isSetGuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guid, typedOther.guid); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guid, other.guid); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSecret()).compareTo(typedOther.isSetSecret()); + lastComparison = Boolean.valueOf(isSetSecret()).compareTo(other.isSetSecret()); if (lastComparison != 0) { return lastComparison; } if (isSetSecret()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secret, typedOther.secret); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secret, other.secret); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Column.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Column.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java index c83663072f877..3c44b602b4ff7 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Column.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Column.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI16Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI16Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI16Column"); 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); @@ -129,7 +133,7 @@ public TI16Column( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TI16Column( */ public TI16Column(TI16Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Short other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TI16Column that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI16Column other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI16Column typedOther = (TI16Column)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI16Column struct) { org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); struct.values = new ArrayList(_list70.size); - for (int _i71 = 0; _i71 < _list70.size; ++_i71) + short _elem71; + for (int _i72 = 0; _i72 < _list70.size; ++_i72) { - short _elem72; // optional - _elem72 = iprot.readI16(); - struct.values.add(_elem72); + _elem71 = iprot.readI16(); + struct.values.add(_elem71); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI16Column struct) t { org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I16, iprot.readI32()); struct.values = new ArrayList(_list75.size); - for (int _i76 = 0; _i76 < _list75.size; ++_i76) + short _elem76; + for (int _i77 = 0; _i77 < _list75.size; ++_i77) { - short _elem77; // optional - _elem77 = iprot.readI16(); - struct.values.add(_elem77); + _elem76 = iprot.readI16(); + struct.values.add(_elem76); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Value.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Value.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java index bb5ae9609de86..29fb4cb85201d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI16Value.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI16Value.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI16Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI16Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI16Value"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I16, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Short.valueOf(getValue()); + return getValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TI16Value that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI16Value other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI16Value typedOther = (TI16Value)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Column.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Column.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java index 6c6c5f35b7c8e..9834f1ce8f01b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Column.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Column.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI32Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI32Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI32Column"); 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); @@ -129,7 +133,7 @@ public TI32Column( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TI32Column( */ public TI32Column(TI32Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Integer other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TI32Column that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI32Column other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI32Column typedOther = (TI32Column)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI32Column struct) { org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); struct.values = new ArrayList(_list78.size); - for (int _i79 = 0; _i79 < _list78.size; ++_i79) + int _elem79; + for (int _i80 = 0; _i80 < _list78.size; ++_i80) { - int _elem80; // optional - _elem80 = iprot.readI32(); - struct.values.add(_elem80); + _elem79 = iprot.readI32(); + struct.values.add(_elem79); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI32Column struct) t { org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.values = new ArrayList(_list83.size); - for (int _i84 = 0; _i84 < _list83.size; ++_i84) + int _elem84; + for (int _i85 = 0; _i85 < _list83.size; ++_i85) { - int _elem85; // optional - _elem85 = iprot.readI32(); - struct.values.add(_elem85); + _elem84 = iprot.readI32(); + struct.values.add(_elem84); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java index 059408b96c8ce..8a69632b2d76e 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI32Value.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI32Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI32Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI32Value"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I32, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Integer.valueOf(getValue()); + return getValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TI32Value that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI32Value other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI32Value typedOther = (TI32Value)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java index cc383ed089fa4..cd5ef2d7a9ed9 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Column.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI64Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI64Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI64Column"); 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); @@ -129,7 +133,7 @@ public TI64Column( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TI64Column( */ public TI64Column(TI64Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (Long other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TI64Column that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI64Column other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI64Column typedOther = (TI64Column)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Column struct) { org.apache.thrift.protocol.TList _list86 = iprot.readListBegin(); struct.values = new ArrayList(_list86.size); - for (int _i87 = 0; _i87 < _list86.size; ++_i87) + long _elem87; + for (int _i88 = 0; _i88 < _list86.size; ++_i88) { - long _elem88; // optional - _elem88 = iprot.readI64(); - struct.values.add(_elem88); + _elem87 = iprot.readI64(); + struct.values.add(_elem87); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI64Column struct) t { org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.values = new ArrayList(_list91.size); - for (int _i92 = 0; _i92 < _list91.size; ++_i92) + long _elem92; + for (int _i93 = 0; _i93 < _list91.size; ++_i93) { - long _elem93; // optional - _elem93 = iprot.readI64(); - struct.values.add(_elem93); + _elem92 = iprot.readI64(); + struct.values.add(_elem92); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java index 9a941cce0c077..393c0bd28610d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TI64Value.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TI64Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TI64Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI64Value"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I64, (short)1); @@ -105,7 +109,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -174,7 +178,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Long.valueOf(getValue()); + return getValue(); } throw new IllegalStateException(); @@ -220,30 +224,30 @@ public boolean equals(TI64Value that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TI64Value other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TI64Value typedOther = (TI64Value)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.java new file mode 100644 index 0000000000000..b39f208c1b878 --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TJobExecutionStatus.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.hive.service.rpc.thrift; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum TJobExecutionStatus implements org.apache.thrift.TEnum { + IN_PROGRESS(0), + COMPLETE(1), + NOT_AVAILABLE(2); + + private final int value; + + private TJobExecutionStatus(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 TJobExecutionStatus findByValue(int value) { + switch (value) { + case 0: + return IN_PROGRESS; + case 1: + return COMPLETE; + case 2: + return NOT_AVAILABLE; + default: + return null; + } + } +} diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java index 425603cbdecbd..7ebc15c9432be 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TMapTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TMapTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMapTypeEntry"); private static final org.apache.thrift.protocol.TField KEY_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("keyTypePtr", org.apache.thrift.protocol.TType.I32, (short)1); @@ -225,10 +229,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case KEY_TYPE_PTR: - return Integer.valueOf(getKeyTypePtr()); + return getKeyTypePtr(); case VALUE_TYPE_PTR: - return Integer.valueOf(getValueTypePtr()); + return getValueTypePtr(); } throw new IllegalStateException(); @@ -285,45 +289,45 @@ public boolean equals(TMapTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_keyTypePtr = true; - builder.append(present_keyTypePtr); + list.add(present_keyTypePtr); if (present_keyTypePtr) - builder.append(keyTypePtr); + list.add(keyTypePtr); boolean present_valueTypePtr = true; - builder.append(present_valueTypePtr); + list.add(present_valueTypePtr); if (present_valueTypePtr) - builder.append(valueTypePtr); + list.add(valueTypePtr); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TMapTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TMapTypeEntry typedOther = (TMapTypeEntry)other; - lastComparison = Boolean.valueOf(isSetKeyTypePtr()).compareTo(typedOther.isSetKeyTypePtr()); + lastComparison = Boolean.valueOf(isSetKeyTypePtr()).compareTo(other.isSetKeyTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyTypePtr, typedOther.keyTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyTypePtr, other.keyTypePtr); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetValueTypePtr()).compareTo(typedOther.isSetValueTypePtr()); + lastComparison = Boolean.valueOf(isSetValueTypePtr()).compareTo(other.isSetValueTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetValueTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueTypePtr, typedOther.valueTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueTypePtr, other.valueTypePtr); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java index c0481615b06d3..e47abbb862cf1 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOpenSessionReq"); private static final org.apache.thrift.protocol.TField CLIENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("client_protocol", org.apache.thrift.protocol.TType.I32, (short)1); @@ -122,7 +126,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION}; + private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -141,7 +145,7 @@ public String getFieldName() { } public TOpenSessionReq() { - this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8; + this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; } @@ -166,18 +170,7 @@ public TOpenSessionReq(TOpenSessionReq other) { this.password = other.password; } if (other.isSetConfiguration()) { - Map __this__configuration = new HashMap(); - for (Map.Entry other_element : other.configuration.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__configuration_copy_key = other_element_key; - - String __this__configuration_copy_value = other_element_value; - - __this__configuration.put(__this__configuration_copy_key, __this__configuration_copy_value); - } + Map __this__configuration = new HashMap(other.configuration); this.configuration = __this__configuration; } } @@ -188,7 +181,7 @@ public TOpenSessionReq deepCopy() { @Override public void clear() { - this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8; + this.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; this.username = null; this.password = null; @@ -434,75 +427,75 @@ public boolean equals(TOpenSessionReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_client_protocol = true && (isSetClient_protocol()); - builder.append(present_client_protocol); + list.add(present_client_protocol); if (present_client_protocol) - builder.append(client_protocol.getValue()); + list.add(client_protocol.getValue()); boolean present_username = true && (isSetUsername()); - builder.append(present_username); + list.add(present_username); if (present_username) - builder.append(username); + list.add(username); boolean present_password = true && (isSetPassword()); - builder.append(present_password); + list.add(present_password); if (present_password) - builder.append(password); + list.add(password); boolean present_configuration = true && (isSetConfiguration()); - builder.append(present_configuration); + list.add(present_configuration); if (present_configuration) - builder.append(configuration); + list.add(configuration); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TOpenSessionReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TOpenSessionReq typedOther = (TOpenSessionReq)other; - lastComparison = Boolean.valueOf(isSetClient_protocol()).compareTo(typedOther.isSetClient_protocol()); + lastComparison = Boolean.valueOf(isSetClient_protocol()).compareTo(other.isSetClient_protocol()); if (lastComparison != 0) { return lastComparison; } if (isSetClient_protocol()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, typedOther.client_protocol); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, other.client_protocol); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUsername()).compareTo(typedOther.isSetUsername()); + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); if (lastComparison != 0) { return lastComparison; } if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword()); + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(typedOther.isSetConfiguration()); + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); if (lastComparison != 0) { return lastComparison; } if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, typedOther.configuration); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); if (lastComparison != 0) { return lastComparison; } @@ -613,7 +606,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str switch (schemeField.id) { case 1: // CLIENT_PROTOCOL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32()); + struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); struct.setClient_protocolIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -640,13 +633,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str { org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); struct.configuration = new HashMap(2*_map142.size); - for (int _i143 = 0; _i143 < _map142.size; ++_i143) + String _key143; + String _val144; + for (int _i145 = 0; _i145 < _map142.size; ++_i145) { - String _key144; // required - String _val145; // required - _key144 = iprot.readString(); - _val145 = iprot.readString(); - struct.configuration.put(_key144, _val145); + _key143 = iprot.readString(); + _val144 = iprot.readString(); + struct.configuration.put(_key143, _val144); } iprot.readMapEnd(); } @@ -752,7 +745,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq str @Override public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32()); + struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); struct.setClient_protocolIsSet(true); BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { @@ -767,13 +760,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq stru { org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.configuration = new HashMap(2*_map148.size); - for (int _i149 = 0; _i149 < _map148.size; ++_i149) + String _key149; + String _val150; + for (int _i151 = 0; _i151 < _map148.size; ++_i151) { - String _key150; // required - String _val151; // required - _key150 = iprot.readString(); - _val151 = iprot.readString(); - struct.configuration.put(_key150, _val151); + _key149 = iprot.readString(); + _val150 = iprot.readString(); + struct.configuration.put(_key149, _val150); } } struct.setConfigurationIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java index 351f78b2de20c..ee1c87bfd76fa 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TOpenSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TOpenSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOpenSessionResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -122,7 +126,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.SESSION_HANDLE,_Fields.CONFIGURATION}; + private static final _Fields optionals[] = {_Fields.SESSION_HANDLE,_Fields.CONFIGURATION}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -141,7 +145,7 @@ public String getFieldName() { } public TOpenSessionResp() { - this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8; + this.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; } @@ -168,18 +172,7 @@ public TOpenSessionResp(TOpenSessionResp other) { this.sessionHandle = new TSessionHandle(other.sessionHandle); } if (other.isSetConfiguration()) { - Map __this__configuration = new HashMap(); - for (Map.Entry other_element : other.configuration.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__configuration_copy_key = other_element_key; - - String __this__configuration_copy_value = other_element_value; - - __this__configuration.put(__this__configuration_copy_key, __this__configuration_copy_value); - } + Map __this__configuration = new HashMap(other.configuration); this.configuration = __this__configuration; } } @@ -191,7 +184,7 @@ public TOpenSessionResp deepCopy() { @Override public void clear() { this.status = null; - this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8; + this.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10; this.sessionHandle = null; this.configuration = null; @@ -436,75 +429,75 @@ public boolean equals(TOpenSessionResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); boolean present_serverProtocolVersion = true && (isSetServerProtocolVersion()); - builder.append(present_serverProtocolVersion); + list.add(present_serverProtocolVersion); if (present_serverProtocolVersion) - builder.append(serverProtocolVersion.getValue()); + list.add(serverProtocolVersion.getValue()); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_configuration = true && (isSetConfiguration()); - builder.append(present_configuration); + list.add(present_configuration); if (present_configuration) - builder.append(configuration); + list.add(configuration); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TOpenSessionResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TOpenSessionResp typedOther = (TOpenSessionResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServerProtocolVersion()).compareTo(typedOther.isSetServerProtocolVersion()); + lastComparison = Boolean.valueOf(isSetServerProtocolVersion()).compareTo(other.isSetServerProtocolVersion()); if (lastComparison != 0) { return lastComparison; } if (isSetServerProtocolVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, typedOther.serverProtocolVersion); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, other.serverProtocolVersion); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(typedOther.isSetConfiguration()); + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); if (lastComparison != 0) { return lastComparison; } if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, typedOther.configuration); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); if (lastComparison != 0) { return lastComparison; } @@ -632,7 +625,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp st break; case 2: // SERVER_PROTOCOL_VERSION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.serverProtocolVersion = TProtocolVersion.findByValue(iprot.readI32()); + struct.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); struct.setServerProtocolVersionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -652,13 +645,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp st { org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin(); struct.configuration = new HashMap(2*_map152.size); - for (int _i153 = 0; _i153 < _map152.size; ++_i153) + String _key153; + String _val154; + for (int _i155 = 0; _i155 < _map152.size; ++_i155) { - String _key154; // required - String _val155; // required - _key154 = iprot.readString(); - _val155 = iprot.readString(); - struct.configuration.put(_key154, _val155); + _key153 = iprot.readString(); + _val154 = iprot.readString(); + struct.configuration.put(_key153, _val154); } iprot.readMapEnd(); } @@ -760,7 +753,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp str struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); - struct.serverProtocolVersion = TProtocolVersion.findByValue(iprot.readI32()); + struct.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); struct.setServerProtocolVersionIsSet(true); BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -772,13 +765,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp str { org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.configuration = new HashMap(2*_map158.size); - for (int _i159 = 0; _i159 < _map158.size; ++_i159) + String _key159; + String _val160; + for (int _i161 = 0; _i161 < _map158.size; ++_i161) { - String _key160; // required - String _val161; // required - _key160 = iprot.readString(); - _val161 = iprot.readString(); - struct.configuration.put(_key160, _val161); + _key159 = iprot.readString(); + _val160 = iprot.readString(); + struct.configuration.put(_key159, _val160); } } struct.setConfigurationIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationHandle.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationHandle.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java index 8fbd8752eaca6..9eaf2be3ed5ea 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationHandle.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationHandle.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TOperationHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TOperationHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOperationHandle"); private static final org.apache.thrift.protocol.TField OPERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operationId", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -125,7 +129,7 @@ public String getFieldName() { private static final int __HASRESULTSET_ISSET_ID = 0; private static final int __MODIFIEDROWCOUNT_ISSET_ID = 1; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.MODIFIED_ROW_COUNT}; + private static final _Fields optionals[] = {_Fields.MODIFIED_ROW_COUNT}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -329,10 +333,10 @@ public Object getFieldValue(_Fields field) { return getOperationType(); case HAS_RESULT_SET: - return Boolean.valueOf(isHasResultSet()); + return isHasResultSet(); case MODIFIED_ROW_COUNT: - return Double.valueOf(getModifiedRowCount()); + return getModifiedRowCount(); } throw new IllegalStateException(); @@ -411,75 +415,75 @@ public boolean equals(TOperationHandle that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_operationId = true && (isSetOperationId()); - builder.append(present_operationId); + list.add(present_operationId); if (present_operationId) - builder.append(operationId); + list.add(operationId); boolean present_operationType = true && (isSetOperationType()); - builder.append(present_operationType); + list.add(present_operationType); if (present_operationType) - builder.append(operationType.getValue()); + list.add(operationType.getValue()); boolean present_hasResultSet = true; - builder.append(present_hasResultSet); + list.add(present_hasResultSet); if (present_hasResultSet) - builder.append(hasResultSet); + list.add(hasResultSet); boolean present_modifiedRowCount = true && (isSetModifiedRowCount()); - builder.append(present_modifiedRowCount); + list.add(present_modifiedRowCount); if (present_modifiedRowCount) - builder.append(modifiedRowCount); + list.add(modifiedRowCount); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TOperationHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TOperationHandle typedOther = (TOperationHandle)other; - lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(typedOther.isSetOperationId()); + lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, typedOther.operationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, other.operationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(typedOther.isSetOperationType()); + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, typedOther.operationType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(typedOther.isSetHasResultSet()); + lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet()); if (lastComparison != 0) { return lastComparison; } if (isSetHasResultSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, typedOther.hasResultSet); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(typedOther.isSetModifiedRowCount()); + lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(other.isSetModifiedRowCount()); if (lastComparison != 0) { return lastComparison; } if (isSetModifiedRowCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, typedOther.modifiedRowCount); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, other.modifiedRowCount); if (lastComparison != 0) { return lastComparison; } @@ -600,7 +604,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOperationHandle st break; case 2: // OPERATION_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operationType = TOperationType.findByValue(iprot.readI32()); + struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32()); struct.setOperationTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -689,7 +693,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOperationHandle str struct.operationId = new THandleIdentifier(); struct.operationId.read(iprot); struct.setOperationIdIsSet(true); - struct.operationType = TOperationType.findByValue(iprot.readI32()); + struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32()); struct.setOperationTypeIsSet(true); struct.hasResultSet = iprot.readBool(); struct.setHasResultSetIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationState.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java similarity index 87% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationState.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java index 219866223a6b0..4390b4b887583 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationState.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationState.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; @@ -19,7 +19,8 @@ public enum TOperationState implements org.apache.thrift.TEnum { CLOSED_STATE(4), ERROR_STATE(5), UKNOWN_STATE(6), - PENDING_STATE(7); + PENDING_STATE(7), + TIMEDOUT_STATE(8); private final int value; @@ -56,6 +57,8 @@ public static TOperationState findByValue(int value) { return UKNOWN_STATE; case 7: return PENDING_STATE; + case 8: + return TIMEDOUT_STATE; default: return null; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationType.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationType.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java index b6d4b2fab9f96..08002ad1dc8e8 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TOperationType.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TOperationType.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TPrimitiveTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TPrimitiveTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java index 9d2abf2b3b084..910c90967f614 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TPrimitiveTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TPrimitiveTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TPrimitiveTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPrimitiveTypeEntry"); 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); @@ -112,7 +116,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.TYPE_QUALIFIERS}; + private static final _Fields optionals[] = {_Fields.TYPE_QUALIFIERS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -294,45 +298,45 @@ public boolean equals(TPrimitiveTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_type = true && (isSetType()); - builder.append(present_type); + list.add(present_type); if (present_type) - builder.append(type.getValue()); + list.add(type.getValue()); boolean present_typeQualifiers = true && (isSetTypeQualifiers()); - builder.append(present_typeQualifiers); + list.add(present_typeQualifiers); if (present_typeQualifiers) - builder.append(typeQualifiers); + list.add(typeQualifiers); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TPrimitiveTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TPrimitiveTypeEntry typedOther = (TPrimitiveTypeEntry)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTypeQualifiers()).compareTo(typedOther.isSetTypeQualifiers()); + lastComparison = Boolean.valueOf(isSetTypeQualifiers()).compareTo(other.isSetTypeQualifiers()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeQualifiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeQualifiers, typedOther.typeQualifiers); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeQualifiers, other.typeQualifiers); if (lastComparison != 0) { return lastComparison; } @@ -426,7 +430,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TPrimitiveTypeEntry switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = TTypeId.findByValue(iprot.readI32()); + struct.type = org.apache.hive.service.rpc.thrift.TTypeId.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -497,7 +501,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TPrimitiveTypeEntry @Override public void read(org.apache.thrift.protocol.TProtocol prot, TPrimitiveTypeEntry struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.type = TTypeId.findByValue(iprot.readI32()); + struct.type = org.apache.hive.service.rpc.thrift.TTypeId.findByValue(iprot.readI32()); struct.setTypeIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java new file mode 100644 index 0000000000000..ecc413aad4cdc --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProgressUpdateResp.java @@ -0,0 +1,1033 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hive.service.rpc.thrift; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import javax.annotation.Generated; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TProgressUpdateResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TProgressUpdateResp"); + + private static final org.apache.thrift.protocol.TField HEADER_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("headerNames", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField PROGRESSED_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("progressedPercentage", org.apache.thrift.protocol.TType.DOUBLE, (short)3); + private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField FOOTER_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("footerSummary", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TProgressUpdateRespStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TProgressUpdateRespTupleSchemeFactory()); + } + + private List headerNames; // required + private List> rows; // required + private double progressedPercentage; // required + private TJobExecutionStatus status; // required + private String footerSummary; // required + private long startTime; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + HEADER_NAMES((short)1, "headerNames"), + ROWS((short)2, "rows"), + PROGRESSED_PERCENTAGE((short)3, "progressedPercentage"), + /** + * + * @see TJobExecutionStatus + */ + STATUS((short)4, "status"), + FOOTER_SUMMARY((short)5, "footerSummary"), + START_TIME((short)6, "startTime"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // HEADER_NAMES + return HEADER_NAMES; + case 2: // ROWS + return ROWS; + case 3: // PROGRESSED_PERCENTAGE + return PROGRESSED_PERCENTAGE; + case 4: // STATUS + return STATUS; + case 5: // FOOTER_SUMMARY + return FOOTER_SUMMARY; + case 6: // START_TIME + return START_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 __PROGRESSEDPERCENTAGE_ISSET_ID = 0; + private static final int __STARTTIME_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.HEADER_NAMES, new org.apache.thrift.meta_data.FieldMetaData("headerNames", 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.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.REQUIRED, + 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.PROGRESSED_PERCENTAGE, new org.apache.thrift.meta_data.FieldMetaData("progressedPercentage", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TJobExecutionStatus.class))); + tmpMap.put(_Fields.FOOTER_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("footerSummary", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", 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(TProgressUpdateResp.class, metaDataMap); + } + + public TProgressUpdateResp() { + } + + public TProgressUpdateResp( + List headerNames, + List> rows, + double progressedPercentage, + TJobExecutionStatus status, + String footerSummary, + long startTime) + { + this(); + this.headerNames = headerNames; + this.rows = rows; + this.progressedPercentage = progressedPercentage; + setProgressedPercentageIsSet(true); + this.status = status; + this.footerSummary = footerSummary; + this.startTime = startTime; + setStartTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TProgressUpdateResp(TProgressUpdateResp other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetHeaderNames()) { + List __this__headerNames = new ArrayList(other.headerNames); + this.headerNames = __this__headerNames; + } + if (other.isSetRows()) { + List> __this__rows = new ArrayList>(other.rows.size()); + for (List other_element : other.rows) { + List __this__rows_copy = new ArrayList(other_element); + __this__rows.add(__this__rows_copy); + } + this.rows = __this__rows; + } + this.progressedPercentage = other.progressedPercentage; + if (other.isSetStatus()) { + this.status = other.status; + } + if (other.isSetFooterSummary()) { + this.footerSummary = other.footerSummary; + } + this.startTime = other.startTime; + } + + public TProgressUpdateResp deepCopy() { + return new TProgressUpdateResp(this); + } + + @Override + public void clear() { + this.headerNames = null; + this.rows = null; + setProgressedPercentageIsSet(false); + this.progressedPercentage = 0.0; + this.status = null; + this.footerSummary = null; + setStartTimeIsSet(false); + this.startTime = 0; + } + + public int getHeaderNamesSize() { + return (this.headerNames == null) ? 0 : this.headerNames.size(); + } + + public java.util.Iterator getHeaderNamesIterator() { + return (this.headerNames == null) ? null : this.headerNames.iterator(); + } + + public void addToHeaderNames(String elem) { + if (this.headerNames == null) { + this.headerNames = new ArrayList(); + } + this.headerNames.add(elem); + } + + public List getHeaderNames() { + return this.headerNames; + } + + public void setHeaderNames(List headerNames) { + this.headerNames = headerNames; + } + + public void unsetHeaderNames() { + this.headerNames = null; + } + + /** Returns true if field headerNames is set (has been assigned a value) and false otherwise */ + public boolean isSetHeaderNames() { + return this.headerNames != null; + } + + public void setHeaderNamesIsSet(boolean value) { + if (!value) { + this.headerNames = null; + } + } + + public int getRowsSize() { + return (this.rows == null) ? 0 : this.rows.size(); + } + + public java.util.Iterator> getRowsIterator() { + return (this.rows == null) ? null : this.rows.iterator(); + } + + public void addToRows(List elem) { + if (this.rows == null) { + this.rows = new ArrayList>(); + } + this.rows.add(elem); + } + + public List> getRows() { + return this.rows; + } + + public void setRows(List> rows) { + this.rows = rows; + } + + public void unsetRows() { + this.rows = null; + } + + /** Returns true if field rows is set (has been assigned a value) and false otherwise */ + public boolean isSetRows() { + return this.rows != null; + } + + public void setRowsIsSet(boolean value) { + if (!value) { + this.rows = null; + } + } + + public double getProgressedPercentage() { + return this.progressedPercentage; + } + + public void setProgressedPercentage(double progressedPercentage) { + this.progressedPercentage = progressedPercentage; + setProgressedPercentageIsSet(true); + } + + public void unsetProgressedPercentage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROGRESSEDPERCENTAGE_ISSET_ID); + } + + /** Returns true if field progressedPercentage is set (has been assigned a value) and false otherwise */ + public boolean isSetProgressedPercentage() { + return EncodingUtils.testBit(__isset_bitfield, __PROGRESSEDPERCENTAGE_ISSET_ID); + } + + public void setProgressedPercentageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROGRESSEDPERCENTAGE_ISSET_ID, value); + } + + /** + * + * @see TJobExecutionStatus + */ + public TJobExecutionStatus getStatus() { + return this.status; + } + + /** + * + * @see TJobExecutionStatus + */ + public void setStatus(TJobExecutionStatus status) { + this.status = status; + } + + public void unsetStatus() { + this.status = null; + } + + /** Returns true if field status is set (has been assigned a value) and false otherwise */ + public boolean isSetStatus() { + return this.status != null; + } + + public void setStatusIsSet(boolean value) { + if (!value) { + this.status = null; + } + } + + public String getFooterSummary() { + return this.footerSummary; + } + + public void setFooterSummary(String footerSummary) { + this.footerSummary = footerSummary; + } + + public void unsetFooterSummary() { + this.footerSummary = null; + } + + /** Returns true if field footerSummary is set (has been assigned a value) and false otherwise */ + public boolean isSetFooterSummary() { + return this.footerSummary != null; + } + + public void setFooterSummaryIsSet(boolean value) { + if (!value) { + this.footerSummary = null; + } + } + + public long getStartTime() { + return this.startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + setStartTimeIsSet(true); + } + + public void unsetStartTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + /** Returns true if field startTime is set (has been assigned a value) and false otherwise */ + public boolean isSetStartTime() { + return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID); + } + + public void setStartTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case HEADER_NAMES: + if (value == null) { + unsetHeaderNames(); + } else { + setHeaderNames((List)value); + } + break; + + case ROWS: + if (value == null) { + unsetRows(); + } else { + setRows((List>)value); + } + break; + + case PROGRESSED_PERCENTAGE: + if (value == null) { + unsetProgressedPercentage(); + } else { + setProgressedPercentage((Double)value); + } + break; + + case STATUS: + if (value == null) { + unsetStatus(); + } else { + setStatus((TJobExecutionStatus)value); + } + break; + + case FOOTER_SUMMARY: + if (value == null) { + unsetFooterSummary(); + } else { + setFooterSummary((String)value); + } + break; + + case START_TIME: + if (value == null) { + unsetStartTime(); + } else { + setStartTime((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case HEADER_NAMES: + return getHeaderNames(); + + case ROWS: + return getRows(); + + case PROGRESSED_PERCENTAGE: + return getProgressedPercentage(); + + case STATUS: + return getStatus(); + + case FOOTER_SUMMARY: + return getFooterSummary(); + + case START_TIME: + return getStartTime(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case HEADER_NAMES: + return isSetHeaderNames(); + case ROWS: + return isSetRows(); + case PROGRESSED_PERCENTAGE: + return isSetProgressedPercentage(); + case STATUS: + return isSetStatus(); + case FOOTER_SUMMARY: + return isSetFooterSummary(); + case START_TIME: + return isSetStartTime(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TProgressUpdateResp) + return this.equals((TProgressUpdateResp)that); + return false; + } + + public boolean equals(TProgressUpdateResp that) { + if (that == null) + return false; + + boolean this_present_headerNames = true && this.isSetHeaderNames(); + boolean that_present_headerNames = true && that.isSetHeaderNames(); + if (this_present_headerNames || that_present_headerNames) { + if (!(this_present_headerNames && that_present_headerNames)) + return false; + if (!this.headerNames.equals(that.headerNames)) + return false; + } + + boolean this_present_rows = true && this.isSetRows(); + boolean that_present_rows = true && that.isSetRows(); + if (this_present_rows || that_present_rows) { + if (!(this_present_rows && that_present_rows)) + return false; + if (!this.rows.equals(that.rows)) + return false; + } + + boolean this_present_progressedPercentage = true; + boolean that_present_progressedPercentage = true; + if (this_present_progressedPercentage || that_present_progressedPercentage) { + if (!(this_present_progressedPercentage && that_present_progressedPercentage)) + return false; + if (this.progressedPercentage != that.progressedPercentage) + return false; + } + + boolean this_present_status = true && this.isSetStatus(); + boolean that_present_status = true && that.isSetStatus(); + if (this_present_status || that_present_status) { + if (!(this_present_status && that_present_status)) + return false; + if (!this.status.equals(that.status)) + return false; + } + + boolean this_present_footerSummary = true && this.isSetFooterSummary(); + boolean that_present_footerSummary = true && that.isSetFooterSummary(); + if (this_present_footerSummary || that_present_footerSummary) { + if (!(this_present_footerSummary && that_present_footerSummary)) + return false; + if (!this.footerSummary.equals(that.footerSummary)) + return false; + } + + boolean this_present_startTime = true; + boolean that_present_startTime = true; + if (this_present_startTime || that_present_startTime) { + if (!(this_present_startTime && that_present_startTime)) + return false; + if (this.startTime != that.startTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_headerNames = true && (isSetHeaderNames()); + list.add(present_headerNames); + if (present_headerNames) + list.add(headerNames); + + boolean present_rows = true && (isSetRows()); + list.add(present_rows); + if (present_rows) + list.add(rows); + + boolean present_progressedPercentage = true; + list.add(present_progressedPercentage); + if (present_progressedPercentage) + list.add(progressedPercentage); + + boolean present_status = true && (isSetStatus()); + list.add(present_status); + if (present_status) + list.add(status.getValue()); + + boolean present_footerSummary = true && (isSetFooterSummary()); + list.add(present_footerSummary); + if (present_footerSummary) + list.add(footerSummary); + + boolean present_startTime = true; + list.add(present_startTime); + if (present_startTime) + list.add(startTime); + + return list.hashCode(); + } + + @Override + public int compareTo(TProgressUpdateResp other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetHeaderNames()).compareTo(other.isSetHeaderNames()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHeaderNames()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.headerNames, other.headerNames); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRows()).compareTo(other.isSetRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProgressedPercentage()).compareTo(other.isSetProgressedPercentage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProgressedPercentage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progressedPercentage, other.progressedPercentage); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatus()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFooterSummary()).compareTo(other.isSetFooterSummary()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFooterSummary()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.footerSummary, other.footerSummary); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TProgressUpdateResp("); + boolean first = true; + + sb.append("headerNames:"); + if (this.headerNames == null) { + sb.append("null"); + } else { + sb.append(this.headerNames); + } + first = false; + if (!first) sb.append(", "); + sb.append("rows:"); + if (this.rows == null) { + sb.append("null"); + } else { + sb.append(this.rows); + } + first = false; + if (!first) sb.append(", "); + sb.append("progressedPercentage:"); + sb.append(this.progressedPercentage); + first = false; + if (!first) sb.append(", "); + sb.append("status:"); + if (this.status == null) { + sb.append("null"); + } else { + sb.append(this.status); + } + first = false; + if (!first) sb.append(", "); + sb.append("footerSummary:"); + if (this.footerSummary == null) { + sb.append("null"); + } else { + sb.append(this.footerSummary); + } + first = false; + if (!first) sb.append(", "); + sb.append("startTime:"); + sb.append(this.startTime); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetHeaderNames()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'headerNames' is unset! Struct:" + toString()); + } + + if (!isSetRows()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'rows' is unset! Struct:" + toString()); + } + + if (!isSetProgressedPercentage()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'progressedPercentage' is unset! Struct:" + toString()); + } + + if (!isSetStatus()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); + } + + if (!isSetFooterSummary()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'footerSummary' is unset! Struct:" + toString()); + } + + if (!isSetStartTime()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'startTime' 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 TProgressUpdateRespStandardSchemeFactory implements SchemeFactory { + public TProgressUpdateRespStandardScheme getScheme() { + return new TProgressUpdateRespStandardScheme(); + } + } + + private static class TProgressUpdateRespStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TProgressUpdateResp struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // HEADER_NAMES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list180 = iprot.readListBegin(); + struct.headerNames = new ArrayList(_list180.size); + String _elem181; + for (int _i182 = 0; _i182 < _list180.size; ++_i182) + { + _elem181 = iprot.readString(); + struct.headerNames.add(_elem181); + } + iprot.readListEnd(); + } + struct.setHeaderNamesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list183 = iprot.readListBegin(); + struct.rows = new ArrayList>(_list183.size); + List _elem184; + for (int _i185 = 0; _i185 < _list183.size; ++_i185) + { + { + org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(); + _elem184 = new ArrayList(_list186.size); + String _elem187; + for (int _i188 = 0; _i188 < _list186.size; ++_i188) + { + _elem187 = iprot.readString(); + _elem184.add(_elem187); + } + iprot.readListEnd(); + } + struct.rows.add(_elem184); + } + iprot.readListEnd(); + } + struct.setRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PROGRESSED_PERCENTAGE + if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { + struct.progressedPercentage = iprot.readDouble(); + struct.setProgressedPercentageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.status = org.apache.hive.service.rpc.thrift.TJobExecutionStatus.findByValue(iprot.readI32()); + struct.setStatusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // FOOTER_SUMMARY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.footerSummary = iprot.readString(); + struct.setFooterSummaryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // START_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TProgressUpdateResp struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.headerNames != null) { + oprot.writeFieldBegin(HEADER_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.headerNames.size())); + for (String _iter189 : struct.headerNames) + { + oprot.writeString(_iter189); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.rows != null) { + oprot.writeFieldBegin(ROWS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.rows.size())); + for (List _iter190 : struct.rows) + { + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter190.size())); + for (String _iter191 : _iter190) + { + oprot.writeString(_iter191); + } + oprot.writeListEnd(); + } + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PROGRESSED_PERCENTAGE_FIELD_DESC); + oprot.writeDouble(struct.progressedPercentage); + oprot.writeFieldEnd(); + if (struct.status != null) { + oprot.writeFieldBegin(STATUS_FIELD_DESC); + oprot.writeI32(struct.status.getValue()); + oprot.writeFieldEnd(); + } + if (struct.footerSummary != null) { + oprot.writeFieldBegin(FOOTER_SUMMARY_FIELD_DESC); + oprot.writeString(struct.footerSummary); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(START_TIME_FIELD_DESC); + oprot.writeI64(struct.startTime); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TProgressUpdateRespTupleSchemeFactory implements SchemeFactory { + public TProgressUpdateRespTupleScheme getScheme() { + return new TProgressUpdateRespTupleScheme(); + } + } + + private static class TProgressUpdateRespTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TProgressUpdateResp struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.headerNames.size()); + for (String _iter192 : struct.headerNames) + { + oprot.writeString(_iter192); + } + } + { + oprot.writeI32(struct.rows.size()); + for (List _iter193 : struct.rows) + { + { + oprot.writeI32(_iter193.size()); + for (String _iter194 : _iter193) + { + oprot.writeString(_iter194); + } + } + } + } + oprot.writeDouble(struct.progressedPercentage); + oprot.writeI32(struct.status.getValue()); + oprot.writeString(struct.footerSummary); + oprot.writeI64(struct.startTime); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TProgressUpdateResp struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.headerNames = new ArrayList(_list195.size); + String _elem196; + for (int _i197 = 0; _i197 < _list195.size; ++_i197) + { + _elem196 = iprot.readString(); + struct.headerNames.add(_elem196); + } + } + struct.setHeaderNamesIsSet(true); + { + org.apache.thrift.protocol.TList _list198 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.rows = new ArrayList>(_list198.size); + List _elem199; + for (int _i200 = 0; _i200 < _list198.size; ++_i200) + { + { + org.apache.thrift.protocol.TList _list201 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _elem199 = new ArrayList(_list201.size); + String _elem202; + for (int _i203 = 0; _i203 < _list201.size; ++_i203) + { + _elem202 = iprot.readString(); + _elem199.add(_elem202); + } + } + struct.rows.add(_elem199); + } + } + struct.setRowsIsSet(true); + struct.progressedPercentage = iprot.readDouble(); + struct.setProgressedPercentageIsSet(true); + struct.status = org.apache.hive.service.rpc.thrift.TJobExecutionStatus.findByValue(iprot.readI32()); + struct.setStatusIsSet(true); + struct.footerSummary = iprot.readString(); + struct.setFooterSummaryIsSet(true); + struct.startTime = iprot.readI64(); + struct.setStartTimeIsSet(true); + } + } + +} + diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TProtocolVersion.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java similarity index 82% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TProtocolVersion.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java index a4279d29f662e..18a782513c500 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TProtocolVersion.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TProtocolVersion.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; @@ -19,7 +19,9 @@ public enum TProtocolVersion implements org.apache.thrift.TEnum { HIVE_CLI_SERVICE_PROTOCOL_V5(4), HIVE_CLI_SERVICE_PROTOCOL_V6(5), HIVE_CLI_SERVICE_PROTOCOL_V7(6), - HIVE_CLI_SERVICE_PROTOCOL_V8(7); + HIVE_CLI_SERVICE_PROTOCOL_V8(7), + HIVE_CLI_SERVICE_PROTOCOL_V9(8), + HIVE_CLI_SERVICE_PROTOCOL_V10(9); private final int value; @@ -56,6 +58,10 @@ public static TProtocolVersion findByValue(int value) { return HIVE_CLI_SERVICE_PROTOCOL_V7; case 7: return HIVE_CLI_SERVICE_PROTOCOL_V8; + case 8: + return HIVE_CLI_SERVICE_PROTOCOL_V9; + case 9: + return HIVE_CLI_SERVICE_PROTOCOL_V10; default: return null; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenReq.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenReq.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java index a3e39c8cdf321..8957ebc8d2fff 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenReq.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TRenewDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TRenewDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRenewDelegationTokenReq"); private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -283,45 +287,45 @@ public boolean equals(TRenewDelegationTokenReq that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionHandle = true && (isSetSessionHandle()); - builder.append(present_sessionHandle); + list.add(present_sessionHandle); if (present_sessionHandle) - builder.append(sessionHandle); + list.add(sessionHandle); boolean present_delegationToken = true && (isSetDelegationToken()); - builder.append(present_delegationToken); + list.add(present_delegationToken); if (present_delegationToken) - builder.append(delegationToken); + list.add(delegationToken); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TRenewDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TRenewDelegationTokenReq typedOther = (TRenewDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenResp.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenResp.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java index 5f3eb6c4d4b90..6f5004ccc38e4 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRenewDelegationTokenResp.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TRenewDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TRenewDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRenewDelegationTokenResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TRenewDelegationTokenResp that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TRenewDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TRenewDelegationTokenResp typedOther = (TRenewDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRow.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java similarity index 91% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRow.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java index a44cfb08ff01a..e95299df97c3a 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRow.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRow.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TRow implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TRow implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRow"); private static final org.apache.thrift.protocol.TField COL_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("colVals", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -128,7 +132,7 @@ public TRow( */ public TRow(TRow other) { if (other.isSetColVals()) { - List __this__colVals = new ArrayList(); + List __this__colVals = new ArrayList(other.colVals.size()); for (TColumnValue other_element : other.colVals) { __this__colVals.add(new TColumnValue(other_element)); } @@ -245,30 +249,30 @@ public boolean equals(TRow that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_colVals = true && (isSetColVals()); - builder.append(present_colVals); + list.add(present_colVals); if (present_colVals) - builder.append(colVals); + list.add(colVals); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TRow other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TRow typedOther = (TRow)other; - lastComparison = Boolean.valueOf(isSetColVals()).compareTo(typedOther.isSetColVals()); + lastComparison = Boolean.valueOf(isSetColVals()).compareTo(other.isSetColVals()); if (lastComparison != 0) { return lastComparison; } if (isSetColVals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colVals, typedOther.colVals); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colVals, other.colVals); if (lastComparison != 0) { return lastComparison; } @@ -352,12 +356,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRow struct) throws { org.apache.thrift.protocol.TList _list46 = iprot.readListBegin(); struct.colVals = new ArrayList(_list46.size); - for (int _i47 = 0; _i47 < _list46.size; ++_i47) + TColumnValue _elem47; + for (int _i48 = 0; _i48 < _list46.size; ++_i48) { - TColumnValue _elem48; // optional - _elem48 = new TColumnValue(); - _elem48.read(iprot); - struct.colVals.add(_elem48); + _elem47 = new TColumnValue(); + _elem47.read(iprot); + struct.colVals.add(_elem47); } iprot.readListEnd(); } @@ -423,12 +427,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TRow struct) throws { org.apache.thrift.protocol.TList _list51 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.colVals = new ArrayList(_list51.size); - for (int _i52 = 0; _i52 < _list51.size; ++_i52) + TColumnValue _elem52; + for (int _i53 = 0; _i53 < _list51.size; ++_i53) { - TColumnValue _elem53; // optional - _elem53 = new TColumnValue(); - _elem53.read(iprot); - struct.colVals.add(_elem53); + _elem52 = new TColumnValue(); + _elem52.read(iprot); + struct.colVals.add(_elem52); } } struct.setColValsIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRowSet.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java similarity index 66% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRowSet.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java index d16c8a4bb32da..da3d9d3ca8820 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TRowSet.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TRowSet.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,15 +29,20 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TRowSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TRowSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowSet"); private static final org.apache.thrift.protocol.TField START_ROW_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("startRowOffset", org.apache.thrift.protocol.TType.I64, (short)1); private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField BINARY_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryColumns", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField COLUMN_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("columnCount", org.apache.thrift.protocol.TType.I32, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -47,12 +53,16 @@ public class TRowSet implements org.apache.thrift.TBase rows; // required private List columns; // optional + private ByteBuffer binaryColumns; // optional + private int columnCount; // 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 { START_ROW_OFFSET((short)1, "startRowOffset"), ROWS((short)2, "rows"), - COLUMNS((short)3, "columns"); + COLUMNS((short)3, "columns"), + BINARY_COLUMNS((short)4, "binaryColumns"), + COLUMN_COUNT((short)5, "columnCount"); private static final Map byName = new HashMap(); @@ -73,6 +83,10 @@ public static _Fields findByThriftId(int fieldId) { return ROWS; case 3: // COLUMNS return COLUMNS; + case 4: // BINARY_COLUMNS + return BINARY_COLUMNS; + case 5: // COLUMN_COUNT + return COLUMN_COUNT; default: return null; } @@ -114,8 +128,9 @@ public String getFieldName() { // isset id assignments private static final int __STARTROWOFFSET_ISSET_ID = 0; + private static final int __COLUMNCOUNT_ISSET_ID = 1; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.COLUMNS}; + private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.BINARY_COLUMNS,_Fields.COLUMN_COUNT}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -127,6 +142,10 @@ public String getFieldName() { tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", 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, TColumn.class)))); + tmpMap.put(_Fields.BINARY_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("binaryColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.COLUMN_COUNT, new org.apache.thrift.meta_data.FieldMetaData("columnCount", 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(TRowSet.class, metaDataMap); } @@ -151,19 +170,23 @@ public TRowSet(TRowSet other) { __isset_bitfield = other.__isset_bitfield; this.startRowOffset = other.startRowOffset; if (other.isSetRows()) { - List __this__rows = new ArrayList(); + List __this__rows = new ArrayList(other.rows.size()); for (TRow other_element : other.rows) { __this__rows.add(new TRow(other_element)); } this.rows = __this__rows; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(); + List __this__columns = new ArrayList(other.columns.size()); for (TColumn other_element : other.columns) { __this__columns.add(new TColumn(other_element)); } this.columns = __this__columns; } + if (other.isSetBinaryColumns()) { + this.binaryColumns = org.apache.thrift.TBaseHelper.copyBinary(other.binaryColumns); + } + this.columnCount = other.columnCount; } public TRowSet deepCopy() { @@ -176,6 +199,9 @@ public void clear() { this.startRowOffset = 0; this.rows = null; this.columns = null; + this.binaryColumns = null; + setColumnCountIsSet(false); + this.columnCount = 0; } public long getStartRowOffset() { @@ -276,6 +302,60 @@ public void setColumnsIsSet(boolean value) { } } + public byte[] getBinaryColumns() { + setBinaryColumns(org.apache.thrift.TBaseHelper.rightSize(binaryColumns)); + return binaryColumns == null ? null : binaryColumns.array(); + } + + public ByteBuffer bufferForBinaryColumns() { + return org.apache.thrift.TBaseHelper.copyBinary(binaryColumns); + } + + public void setBinaryColumns(byte[] binaryColumns) { + this.binaryColumns = binaryColumns == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(binaryColumns, binaryColumns.length)); + } + + public void setBinaryColumns(ByteBuffer binaryColumns) { + this.binaryColumns = org.apache.thrift.TBaseHelper.copyBinary(binaryColumns); + } + + public void unsetBinaryColumns() { + this.binaryColumns = null; + } + + /** Returns true if field binaryColumns is set (has been assigned a value) and false otherwise */ + public boolean isSetBinaryColumns() { + return this.binaryColumns != null; + } + + public void setBinaryColumnsIsSet(boolean value) { + if (!value) { + this.binaryColumns = null; + } + } + + public int getColumnCount() { + return this.columnCount; + } + + public void setColumnCount(int columnCount) { + this.columnCount = columnCount; + setColumnCountIsSet(true); + } + + public void unsetColumnCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COLUMNCOUNT_ISSET_ID); + } + + /** Returns true if field columnCount is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnCount() { + return EncodingUtils.testBit(__isset_bitfield, __COLUMNCOUNT_ISSET_ID); + } + + public void setColumnCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COLUMNCOUNT_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case START_ROW_OFFSET: @@ -302,13 +382,29 @@ public void setFieldValue(_Fields field, Object value) { } break; + case BINARY_COLUMNS: + if (value == null) { + unsetBinaryColumns(); + } else { + setBinaryColumns((ByteBuffer)value); + } + break; + + case COLUMN_COUNT: + if (value == null) { + unsetColumnCount(); + } else { + setColumnCount((Integer)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { case START_ROW_OFFSET: - return Long.valueOf(getStartRowOffset()); + return getStartRowOffset(); case ROWS: return getRows(); @@ -316,6 +412,12 @@ public Object getFieldValue(_Fields field) { case COLUMNS: return getColumns(); + case BINARY_COLUMNS: + return getBinaryColumns(); + + case COLUMN_COUNT: + return getColumnCount(); + } throw new IllegalStateException(); } @@ -333,6 +435,10 @@ public boolean isSet(_Fields field) { return isSetRows(); case COLUMNS: return isSetColumns(); + case BINARY_COLUMNS: + return isSetBinaryColumns(); + case COLUMN_COUNT: + return isSetColumnCount(); } throw new IllegalStateException(); } @@ -377,65 +483,113 @@ public boolean equals(TRowSet that) { return false; } + boolean this_present_binaryColumns = true && this.isSetBinaryColumns(); + boolean that_present_binaryColumns = true && that.isSetBinaryColumns(); + if (this_present_binaryColumns || that_present_binaryColumns) { + if (!(this_present_binaryColumns && that_present_binaryColumns)) + return false; + if (!this.binaryColumns.equals(that.binaryColumns)) + return false; + } + + boolean this_present_columnCount = true && this.isSetColumnCount(); + boolean that_present_columnCount = true && that.isSetColumnCount(); + if (this_present_columnCount || that_present_columnCount) { + if (!(this_present_columnCount && that_present_columnCount)) + return false; + if (this.columnCount != that.columnCount) + return false; + } + return true; } @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_startRowOffset = true; - builder.append(present_startRowOffset); + list.add(present_startRowOffset); if (present_startRowOffset) - builder.append(startRowOffset); + list.add(startRowOffset); boolean present_rows = true && (isSetRows()); - builder.append(present_rows); + list.add(present_rows); if (present_rows) - builder.append(rows); + list.add(rows); boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); + list.add(present_columns); if (present_columns) - builder.append(columns); + list.add(columns); + + boolean present_binaryColumns = true && (isSetBinaryColumns()); + list.add(present_binaryColumns); + if (present_binaryColumns) + list.add(binaryColumns); + + boolean present_columnCount = true && (isSetColumnCount()); + list.add(present_columnCount); + if (present_columnCount) + list.add(columnCount); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TRowSet other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TRowSet typedOther = (TRowSet)other; - lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(typedOther.isSetStartRowOffset()); + lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(other.isSetStartRowOffset()); if (lastComparison != 0) { return lastComparison; } if (isSetStartRowOffset()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, typedOther.startRowOffset); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, other.startRowOffset); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); + lastComparison = Boolean.valueOf(isSetRows()).compareTo(other.isSetRows()); if (lastComparison != 0) { return lastComparison; } if (isSetRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBinaryColumns()).compareTo(other.isSetBinaryColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBinaryColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryColumns, other.binaryColumns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnCount()).compareTo(other.isSetColumnCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCount, other.columnCount); if (lastComparison != 0) { return lastComparison; } @@ -481,6 +635,22 @@ public String toString() { } first = false; } + if (isSetBinaryColumns()) { + if (!first) sb.append(", "); + sb.append("binaryColumns:"); + if (this.binaryColumns == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.binaryColumns, sb); + } + first = false; + } + if (isSetColumnCount()) { + if (!first) sb.append(", "); + sb.append("columnCount:"); + sb.append(this.columnCount); + first = false; + } sb.append(")"); return sb.toString(); } @@ -547,12 +717,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr { org.apache.thrift.protocol.TList _list118 = iprot.readListBegin(); struct.rows = new ArrayList(_list118.size); - for (int _i119 = 0; _i119 < _list118.size; ++_i119) + TRow _elem119; + for (int _i120 = 0; _i120 < _list118.size; ++_i120) { - TRow _elem120; // optional - _elem120 = new TRow(); - _elem120.read(iprot); - struct.rows.add(_elem120); + _elem119 = new TRow(); + _elem119.read(iprot); + struct.rows.add(_elem119); } iprot.readListEnd(); } @@ -566,12 +736,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr { org.apache.thrift.protocol.TList _list121 = iprot.readListBegin(); struct.columns = new ArrayList(_list121.size); - for (int _i122 = 0; _i122 < _list121.size; ++_i122) + TColumn _elem122; + for (int _i123 = 0; _i123 < _list121.size; ++_i123) { - TColumn _elem123; // optional - _elem123 = new TColumn(); - _elem123.read(iprot); - struct.columns.add(_elem123); + _elem122 = new TColumn(); + _elem122.read(iprot); + struct.columns.add(_elem122); } iprot.readListEnd(); } @@ -580,6 +750,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 4: // BINARY_COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.binaryColumns = iprot.readBinary(); + struct.setBinaryColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // COLUMN_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.columnCount = iprot.readI32(); + struct.setColumnCountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -622,6 +808,18 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TRowSet struct) th oprot.writeFieldEnd(); } } + if (struct.binaryColumns != null) { + if (struct.isSetBinaryColumns()) { + oprot.writeFieldBegin(BINARY_COLUMNS_FIELD_DESC); + oprot.writeBinary(struct.binaryColumns); + oprot.writeFieldEnd(); + } + } + if (struct.isSetColumnCount()) { + oprot.writeFieldBegin(COLUMN_COUNT_FIELD_DESC); + oprot.writeI32(struct.columnCount); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -651,7 +849,13 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) thr if (struct.isSetColumns()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetBinaryColumns()) { + optionals.set(1); + } + if (struct.isSetColumnCount()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetColumns()) { { oprot.writeI32(struct.columns.size()); @@ -661,6 +865,12 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) thr } } } + if (struct.isSetBinaryColumns()) { + oprot.writeBinary(struct.binaryColumns); + } + if (struct.isSetColumnCount()) { + oprot.writeI32(struct.columnCount); + } } @Override @@ -671,30 +881,38 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) thro { org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.rows = new ArrayList(_list128.size); - for (int _i129 = 0; _i129 < _list128.size; ++_i129) + TRow _elem129; + for (int _i130 = 0; _i130 < _list128.size; ++_i130) { - TRow _elem130; // optional - _elem130 = new TRow(); - _elem130.read(iprot); - struct.rows.add(_elem130); + _elem129 = new TRow(); + _elem129.read(iprot); + struct.rows.add(_elem129); } } struct.setRowsIsSet(true); - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList(_list131.size); - for (int _i132 = 0; _i132 < _list131.size; ++_i132) + TColumn _elem132; + for (int _i133 = 0; _i133 < _list131.size; ++_i133) { - TColumn _elem133; // optional - _elem133 = new TColumn(); - _elem133.read(iprot); - struct.columns.add(_elem133); + _elem132 = new TColumn(); + _elem132.read(iprot); + struct.columns.add(_elem132); } } struct.setColumnsIsSet(true); } + if (incoming.get(1)) { + struct.binaryColumns = iprot.readBinary(); + struct.setBinaryColumnsIsSet(true); + } + if (incoming.get(2)) { + struct.columnCount = iprot.readI32(); + struct.setColumnCountIsSet(true); + } } } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TSessionHandle.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TSessionHandle.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java index 82c00dd68a98b..b5cb6e7b15aa6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TSessionHandle.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TSessionHandle.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSessionHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TSessionHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSessionHandle"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TSessionHandle that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_sessionId = true && (isSetSessionId()); - builder.append(present_sessionId); + list.add(present_sessionId); if (present_sessionId) - builder.append(sessionId); + list.add(sessionId); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSessionHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSessionHandle typedOther = (TSessionHandle)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatus.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatus.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java index 24a746e94965d..50f4531b0a209 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatus.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatus.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TStatus implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TStatus implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStatus"); private static final org.apache.thrift.protocol.TField STATUS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCode", org.apache.thrift.protocol.TType.I32, (short)1); @@ -129,7 +133,7 @@ public String getFieldName() { // isset id assignments private static final int __ERRORCODE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.INFO_MESSAGES,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE}; + private static final _Fields optionals[] = {_Fields.INFO_MESSAGES,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -167,10 +171,7 @@ public TStatus(TStatus other) { this.statusCode = other.statusCode; } if (other.isSetInfoMessages()) { - List __this__infoMessages = new ArrayList(); - for (String other_element : other.infoMessages) { - __this__infoMessages.add(other_element); - } + List __this__infoMessages = new ArrayList(other.infoMessages); this.infoMessages = __this__infoMessages; } if (other.isSetSqlState()) { @@ -390,7 +391,7 @@ public Object getFieldValue(_Fields field) { return getSqlState(); case ERROR_CODE: - return Integer.valueOf(getErrorCode()); + return getErrorCode(); case ERROR_MESSAGE: return getErrorMessage(); @@ -483,90 +484,90 @@ public boolean equals(TStatus that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_statusCode = true && (isSetStatusCode()); - builder.append(present_statusCode); + list.add(present_statusCode); if (present_statusCode) - builder.append(statusCode.getValue()); + list.add(statusCode.getValue()); boolean present_infoMessages = true && (isSetInfoMessages()); - builder.append(present_infoMessages); + list.add(present_infoMessages); if (present_infoMessages) - builder.append(infoMessages); + list.add(infoMessages); boolean present_sqlState = true && (isSetSqlState()); - builder.append(present_sqlState); + list.add(present_sqlState); if (present_sqlState) - builder.append(sqlState); + list.add(sqlState); boolean present_errorCode = true && (isSetErrorCode()); - builder.append(present_errorCode); + list.add(present_errorCode); if (present_errorCode) - builder.append(errorCode); + list.add(errorCode); boolean present_errorMessage = true && (isSetErrorMessage()); - builder.append(present_errorMessage); + list.add(present_errorMessage); if (present_errorMessage) - builder.append(errorMessage); + list.add(errorMessage); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TStatus other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TStatus typedOther = (TStatus)other; - lastComparison = Boolean.valueOf(isSetStatusCode()).compareTo(typedOther.isSetStatusCode()); + lastComparison = Boolean.valueOf(isSetStatusCode()).compareTo(other.isSetStatusCode()); if (lastComparison != 0) { return lastComparison; } if (isSetStatusCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, typedOther.statusCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, other.statusCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoMessages()).compareTo(typedOther.isSetInfoMessages()); + lastComparison = Boolean.valueOf(isSetInfoMessages()).compareTo(other.isSetInfoMessages()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoMessages()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoMessages, typedOther.infoMessages); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoMessages, other.infoMessages); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(typedOther.isSetSqlState()); + lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState()); if (lastComparison != 0) { return lastComparison; } if (isSetSqlState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, typedOther.sqlState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(typedOther.isSetErrorMessage()); + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, typedOther.errorMessage); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); if (lastComparison != 0) { return lastComparison; } @@ -685,7 +686,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStatus struct) thr switch (schemeField.id) { case 1: // STATUS_CODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.statusCode = TStatusCode.findByValue(iprot.readI32()); + struct.statusCode = org.apache.hive.service.rpc.thrift.TStatusCode.findByValue(iprot.readI32()); struct.setStatusCodeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -696,11 +697,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStatus struct) thr { org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); struct.infoMessages = new ArrayList(_list134.size); - for (int _i135 = 0; _i135 < _list134.size; ++_i135) + String _elem135; + for (int _i136 = 0; _i136 < _list134.size; ++_i136) { - String _elem136; // optional - _elem136 = iprot.readString(); - struct.infoMessages.add(_elem136); + _elem135 = iprot.readString(); + struct.infoMessages.add(_elem135); } iprot.readListEnd(); } @@ -839,18 +840,18 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TStatus struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TStatus struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.statusCode = TStatusCode.findByValue(iprot.readI32()); + struct.statusCode = org.apache.hive.service.rpc.thrift.TStatusCode.findByValue(iprot.readI32()); struct.setStatusCodeIsSet(true); BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.infoMessages = new ArrayList(_list139.size); - for (int _i140 = 0; _i140 < _list139.size; ++_i140) + String _elem140; + for (int _i141 = 0; _i141 < _list139.size; ++_i141) { - String _elem141; // optional - _elem141 = iprot.readString(); - struct.infoMessages.add(_elem141); + _elem140 = iprot.readString(); + struct.infoMessages.add(_elem140); } } struct.setInfoMessagesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatusCode.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java similarity index 92% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatusCode.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java index e7fde45fd131a..fbf14184fa9a8 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStatusCode.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStatusCode.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringColumn.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java similarity index 90% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringColumn.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java index 3dae460c8621d..c83a1fd0de3c2 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringColumn.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringColumn.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TStringColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TStringColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStringColumn"); 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); @@ -129,7 +133,7 @@ public TStringColumn( { this(); this.values = values; - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } /** @@ -137,15 +141,11 @@ public TStringColumn( */ public TStringColumn(TStringColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(); - for (String other_element : other.values) { - __this__values.add(other_element); - } + List __this__values = new ArrayList(other.values); this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); -; } } @@ -203,15 +203,15 @@ public byte[] getNulls() { } public ByteBuffer bufferForNulls() { - return nulls; + return org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void setNulls(byte[] nulls) { - setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); } public void setNulls(ByteBuffer nulls) { - this.nulls = nulls; + this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); } public void unsetNulls() { @@ -313,45 +313,45 @@ public boolean equals(TStringColumn that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_values = true && (isSetValues()); - builder.append(present_values); + list.add(present_values); if (present_values) - builder.append(values); + list.add(values); boolean present_nulls = true && (isSetNulls()); - builder.append(present_nulls); + list.add(present_nulls); if (present_nulls) - builder.append(nulls); + list.add(nulls); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TStringColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TStringColumn typedOther = (TStringColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); if (lastComparison != 0) { return lastComparison; } @@ -447,11 +447,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStringColumn struc { org.apache.thrift.protocol.TList _list102 = iprot.readListBegin(); struct.values = new ArrayList(_list102.size); - for (int _i103 = 0; _i103 < _list102.size; ++_i103) + String _elem103; + for (int _i104 = 0; _i104 < _list102.size; ++_i104) { - String _elem104; // optional - _elem104 = iprot.readString(); - struct.values.add(_elem104); + _elem103 = iprot.readString(); + struct.values.add(_elem103); } iprot.readListEnd(); } @@ -531,11 +531,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TStringColumn struct { org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.values = new ArrayList(_list107.size); - for (int _i108 = 0; _i108 < _list107.size; ++_i108) + String _elem108; + for (int _i109 = 0; _i109 < _list107.size; ++_i109) { - String _elem109; // optional - _elem109 = iprot.readString(); - struct.values.add(_elem109); + _elem108 = iprot.readString(); + struct.values.add(_elem108); } } struct.setValuesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java similarity index 93% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java index af7a109775a8b..13874e5516632 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStringValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStringValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TStringValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TStringValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStringValue"); 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)1); @@ -103,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private _Fields optionals[] = {_Fields.VALUE}; + private static final _Fields optionals[] = {_Fields.VALUE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -219,30 +223,30 @@ public boolean equals(TStringValue that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_value = true && (isSetValue()); - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TStringValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TStringValue typedOther = (TStringValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStructTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java similarity index 92% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStructTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java index 20f5fb6c29073..6c2c4f5dd2ddf 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TStructTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TStructTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TStructTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStructTypeEntry"); private static final org.apache.thrift.protocol.TField NAME_TO_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("nameToTypePtr", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -129,7 +133,7 @@ public TStructTypeEntry( */ public TStructTypeEntry(TStructTypeEntry other) { if (other.isSetNameToTypePtr()) { - Map __this__nameToTypePtr = new HashMap(); + Map __this__nameToTypePtr = new HashMap(other.nameToTypePtr.size()); for (Map.Entry other_element : other.nameToTypePtr.entrySet()) { String other_element_key = other_element.getKey(); @@ -250,30 +254,30 @@ public boolean equals(TStructTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_nameToTypePtr = true && (isSetNameToTypePtr()); - builder.append(present_nameToTypePtr); + list.add(present_nameToTypePtr); if (present_nameToTypePtr) - builder.append(nameToTypePtr); + list.add(nameToTypePtr); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TStructTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TStructTypeEntry typedOther = (TStructTypeEntry)other; - lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(typedOther.isSetNameToTypePtr()); + lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(other.isSetNameToTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetNameToTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, typedOther.nameToTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, other.nameToTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -357,13 +361,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStructTypeEntry st { org.apache.thrift.protocol.TMap _map10 = iprot.readMapBegin(); struct.nameToTypePtr = new HashMap(2*_map10.size); - for (int _i11 = 0; _i11 < _map10.size; ++_i11) + String _key11; + int _val12; + for (int _i13 = 0; _i13 < _map10.size; ++_i13) { - String _key12; // required - int _val13; // required - _key12 = iprot.readString(); - _val13 = iprot.readI32(); - struct.nameToTypePtr.put(_key12, _val13); + _key11 = iprot.readString(); + _val12 = iprot.readI32(); + struct.nameToTypePtr.put(_key11, _val12); } iprot.readMapEnd(); } @@ -431,13 +435,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TStructTypeEntry str { org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.nameToTypePtr = new HashMap(2*_map16.size); - for (int _i17 = 0; _i17 < _map16.size; ++_i17) + String _key17; + int _val18; + for (int _i19 = 0; _i19 < _map16.size; ++_i19) { - String _key18; // required - int _val19; // required - _key18 = iprot.readString(); - _val19 = iprot.readI32(); - struct.nameToTypePtr.put(_key18, _val19); + _key17 = iprot.readString(); + _val18 = iprot.readI32(); + struct.nameToTypePtr.put(_key17, _val18); } } struct.setNameToTypePtrIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTableSchema.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java similarity index 91% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTableSchema.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java index ff5e54db7c16c..007b1603546ac 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTableSchema.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTableSchema.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TTableSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TTableSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableSchema"); private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -128,7 +132,7 @@ public TTableSchema( */ public TTableSchema(TTableSchema other) { if (other.isSetColumns()) { - List __this__columns = new ArrayList(); + List __this__columns = new ArrayList(other.columns.size()); for (TColumnDesc other_element : other.columns) { __this__columns.add(new TColumnDesc(other_element)); } @@ -245,30 +249,30 @@ public boolean equals(TTableSchema that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_columns = true && (isSetColumns()); - builder.append(present_columns); + list.add(present_columns); if (present_columns) - builder.append(columns); + list.add(columns); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TTableSchema other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TTableSchema typedOther = (TTableSchema)other; - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); if (lastComparison != 0) { return lastComparison; } @@ -352,12 +356,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTableSchema struct { org.apache.thrift.protocol.TList _list38 = iprot.readListBegin(); struct.columns = new ArrayList(_list38.size); - for (int _i39 = 0; _i39 < _list38.size; ++_i39) + TColumnDesc _elem39; + for (int _i40 = 0; _i40 < _list38.size; ++_i40) { - TColumnDesc _elem40; // optional - _elem40 = new TColumnDesc(); - _elem40.read(iprot); - struct.columns.add(_elem40); + _elem39 = new TColumnDesc(); + _elem39.read(iprot); + struct.columns.add(_elem39); } iprot.readListEnd(); } @@ -423,12 +427,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTableSchema struct) { org.apache.thrift.protocol.TList _list43 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList(_list43.size); - for (int _i44 = 0; _i44 < _list43.size; ++_i44) + TColumnDesc _elem44; + for (int _i45 = 0; _i45 < _list43.size; ++_i45) { - TColumnDesc _elem45; // optional - _elem45 = new TColumnDesc(); - _elem45.read(iprot); - struct.columns.add(_elem45); + _elem44 = new TColumnDesc(); + _elem44.read(iprot); + struct.columns.add(_elem44); } } struct.setColumnsIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeDesc.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java similarity index 91% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeDesc.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java index 251f86a914719..055a14d06a2d6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeDesc.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeDesc.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TTypeDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TTypeDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeDesc"); private static final org.apache.thrift.protocol.TField TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("types", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -128,7 +132,7 @@ public TTypeDesc( */ public TTypeDesc(TTypeDesc other) { if (other.isSetTypes()) { - List __this__types = new ArrayList(); + List __this__types = new ArrayList(other.types.size()); for (TTypeEntry other_element : other.types) { __this__types.add(new TTypeEntry(other_element)); } @@ -245,30 +249,30 @@ public boolean equals(TTypeDesc that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_types = true && (isSetTypes()); - builder.append(present_types); + list.add(present_types); if (present_types) - builder.append(types); + list.add(types); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TTypeDesc other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TTypeDesc typedOther = (TTypeDesc)other; - lastComparison = Boolean.valueOf(isSetTypes()).compareTo(typedOther.isSetTypes()); + lastComparison = Boolean.valueOf(isSetTypes()).compareTo(other.isSetTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, typedOther.types); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, other.types); if (lastComparison != 0) { return lastComparison; } @@ -352,12 +356,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeDesc struct) t { org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); struct.types = new ArrayList(_list30.size); - for (int _i31 = 0; _i31 < _list30.size; ++_i31) + TTypeEntry _elem31; + for (int _i32 = 0; _i32 < _list30.size; ++_i32) { - TTypeEntry _elem32; // optional - _elem32 = new TTypeEntry(); - _elem32.read(iprot); - struct.types.add(_elem32); + _elem31 = new TTypeEntry(); + _elem31.read(iprot); + struct.types.add(_elem31); } iprot.readListEnd(); } @@ -423,12 +427,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTypeDesc struct) th { org.apache.thrift.protocol.TList _list35 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.types = new ArrayList(_list35.size); - for (int _i36 = 0; _i36 < _list35.size; ++_i36) + TTypeEntry _elem36; + for (int _i37 = 0; _i37 < _list35.size; ++_i37) { - TTypeEntry _elem37; // optional - _elem37 = new TTypeEntry(); - _elem37.read(iprot); - struct.types.add(_elem37); + _elem36 = new TTypeEntry(); + _elem36.read(iprot); + struct.types.add(_elem36); } } struct.setTypesIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java similarity index 97% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java index d0d70c1279572..b609151b8fbee 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.BitSet; import 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 TTypeEntry extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeEntry"); private static final org.apache.thrift.protocol.TField PRIMITIVE_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("primitiveEntry", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -291,6 +294,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip 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; } } @@ -575,19 +579,19 @@ public int compareTo(TTypeEntry other) { @Override public int hashCode() { - HashCodeBuilder hcb = new HashCodeBuilder(); - hcb.append(this.getClass().getName()); + List list = new ArrayList(); + list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { - hcb.append(setField.getThriftFieldId()); + list.add(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { - hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { - hcb.append(value); + list.add(value); } } - return hcb.toHashCode(); + return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeId.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java similarity index 95% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeId.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java index 40f05894623c0..a3735ebf3ec07 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeId.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeId.java @@ -1,10 +1,10 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; import java.util.Map; diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifierValue.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifierValue.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java index a3e3829372276..1720c0e9a72c2 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifierValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.BitSet; import 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 TTypeQualifierValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeQualifierValue"); private static final org.apache.thrift.protocol.TField I32_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("i32Value", org.apache.thrift.protocol.TType.I32, (short)1); @@ -181,6 +184,7 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip 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; } } @@ -326,19 +330,19 @@ public int compareTo(TTypeQualifierValue other) { @Override public int hashCode() { - HashCodeBuilder hcb = new HashCodeBuilder(); - hcb.append(this.getClass().getName()); + List list = new ArrayList(); + list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { - hcb.append(setField.getThriftFieldId()); + list.add(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { - hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { - hcb.append(value); + list.add(value); } } - return hcb.toHashCode(); + return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifiers.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java similarity index 91% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifiers.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java index 39355551d3722..f46d2ceb79caa 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TTypeQualifiers.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TTypeQualifiers implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TTypeQualifiers implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeQualifiers"); private static final org.apache.thrift.protocol.TField QUALIFIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifiers", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -129,7 +133,7 @@ public TTypeQualifiers( */ public TTypeQualifiers(TTypeQualifiers other) { if (other.isSetQualifiers()) { - Map __this__qualifiers = new HashMap(); + Map __this__qualifiers = new HashMap(other.qualifiers.size()); for (Map.Entry other_element : other.qualifiers.entrySet()) { String other_element_key = other_element.getKey(); @@ -250,30 +254,30 @@ public boolean equals(TTypeQualifiers that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_qualifiers = true && (isSetQualifiers()); - builder.append(present_qualifiers); + list.add(present_qualifiers); if (present_qualifiers) - builder.append(qualifiers); + list.add(qualifiers); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TTypeQualifiers other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TTypeQualifiers typedOther = (TTypeQualifiers)other; - lastComparison = Boolean.valueOf(isSetQualifiers()).compareTo(typedOther.isSetQualifiers()); + lastComparison = Boolean.valueOf(isSetQualifiers()).compareTo(other.isSetQualifiers()); if (lastComparison != 0) { return lastComparison; } if (isSetQualifiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifiers, typedOther.qualifiers); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifiers, other.qualifiers); if (lastComparison != 0) { return lastComparison; } @@ -357,14 +361,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeQualifiers str { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); struct.qualifiers = new HashMap(2*_map0.size); - for (int _i1 = 0; _i1 < _map0.size; ++_i1) + String _key1; + TTypeQualifierValue _val2; + for (int _i3 = 0; _i3 < _map0.size; ++_i3) { - String _key2; // required - TTypeQualifierValue _val3; // required - _key2 = iprot.readString(); - _val3 = new TTypeQualifierValue(); - _val3.read(iprot); - struct.qualifiers.put(_key2, _val3); + _key1 = iprot.readString(); + _val2 = new TTypeQualifierValue(); + _val2.read(iprot); + struct.qualifiers.put(_key1, _val2); } iprot.readMapEnd(); } @@ -432,14 +436,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTypeQualifiers stru { org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.qualifiers = new HashMap(2*_map6.size); - for (int _i7 = 0; _i7 < _map6.size; ++_i7) + String _key7; + TTypeQualifierValue _val8; + for (int _i9 = 0; _i9 < _map6.size; ++_i9) { - String _key8; // required - TTypeQualifierValue _val9; // required - _key8 = iprot.readString(); - _val9 = new TTypeQualifierValue(); - _val9.read(iprot); - struct.qualifiers.put(_key8, _val9); + _key7 = iprot.readString(); + _val8 = new TTypeQualifierValue(); + _val8.read(iprot); + struct.qualifiers.put(_key7, _val8); } } struct.setQualifiersIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUnionTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java similarity index 92% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUnionTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java index 73dd45d3dd01a..d53f74cb8eff1 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUnionTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TUnionTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TUnionTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUnionTypeEntry"); private static final org.apache.thrift.protocol.TField NAME_TO_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("nameToTypePtr", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -129,7 +133,7 @@ public TUnionTypeEntry( */ public TUnionTypeEntry(TUnionTypeEntry other) { if (other.isSetNameToTypePtr()) { - Map __this__nameToTypePtr = new HashMap(); + Map __this__nameToTypePtr = new HashMap(other.nameToTypePtr.size()); for (Map.Entry other_element : other.nameToTypePtr.entrySet()) { String other_element_key = other_element.getKey(); @@ -250,30 +254,30 @@ public boolean equals(TUnionTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_nameToTypePtr = true && (isSetNameToTypePtr()); - builder.append(present_nameToTypePtr); + list.add(present_nameToTypePtr); if (present_nameToTypePtr) - builder.append(nameToTypePtr); + list.add(nameToTypePtr); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TUnionTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TUnionTypeEntry typedOther = (TUnionTypeEntry)other; - lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(typedOther.isSetNameToTypePtr()); + lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(other.isSetNameToTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetNameToTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, typedOther.nameToTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, other.nameToTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -357,13 +361,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TUnionTypeEntry str { org.apache.thrift.protocol.TMap _map20 = iprot.readMapBegin(); struct.nameToTypePtr = new HashMap(2*_map20.size); - for (int _i21 = 0; _i21 < _map20.size; ++_i21) + String _key21; + int _val22; + for (int _i23 = 0; _i23 < _map20.size; ++_i23) { - String _key22; // required - int _val23; // required - _key22 = iprot.readString(); - _val23 = iprot.readI32(); - struct.nameToTypePtr.put(_key22, _val23); + _key21 = iprot.readString(); + _val22 = iprot.readI32(); + struct.nameToTypePtr.put(_key21, _val22); } iprot.readMapEnd(); } @@ -431,13 +435,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TUnionTypeEntry stru { org.apache.thrift.protocol.TMap _map26 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.nameToTypePtr = new HashMap(2*_map26.size); - for (int _i27 = 0; _i27 < _map26.size; ++_i27) + String _key27; + int _val28; + for (int _i29 = 0; _i29 < _map26.size; ++_i29) { - String _key28; // required - int _val29; // required - _key28 = iprot.readString(); - _val29 = iprot.readI32(); - struct.nameToTypePtr.put(_key28, _val29); + _key27 = iprot.readString(); + _val28 = iprot.readI32(); + struct.nameToTypePtr.put(_key27, _val28); } } struct.setNameToTypePtrIsSet(true); diff --git a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUserDefinedTypeEntry.java b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java similarity index 94% rename from sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUserDefinedTypeEntry.java rename to sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java index 3a111a2c8c2c6..b80c4dd5c6302 100644 --- a/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/cli/thrift/TUserDefinedTypeEntry.java +++ b/sql/hive-thriftserver/v2.3.5/src/gen/java/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.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.hive.service.cli.thrift; +package org.apache.hive.service.rpc.thrift; -import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TUserDefinedTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +public class TUserDefinedTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUserDefinedTypeEntry"); private static final org.apache.thrift.protocol.TField TYPE_CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("typeClassName", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -225,30 +229,30 @@ public boolean equals(TUserDefinedTypeEntry that) { @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List list = new ArrayList(); boolean present_typeClassName = true && (isSetTypeClassName()); - builder.append(present_typeClassName); + list.add(present_typeClassName); if (present_typeClassName) - builder.append(typeClassName); + list.add(typeClassName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TUserDefinedTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TUserDefinedTypeEntry typedOther = (TUserDefinedTypeEntry)other; - lastComparison = Boolean.valueOf(isSetTypeClassName()).compareTo(typedOther.isSetTypeClassName()); + lastComparison = Boolean.valueOf(isSetTypeClassName()).compareTo(other.isSetTypeClassName()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeClassName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeClassName, typedOther.typeClassName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeClassName, other.typeClassName); if (lastComparison != 0) { return lastComparison; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/AbstractService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/AbstractService.java index 7e557aeccf5b0..ee9bc07fa9d84 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/AbstractService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/AbstractService.java @@ -21,9 +21,9 @@ import java.util.ArrayList; import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * AbstractService. @@ -31,7 +31,7 @@ */ public abstract class AbstractService implements Service { - private static final Log LOG = LogFactory.getLog(AbstractService.class); + private static final Logger LOG = LoggerFactory.getLogger(AbstractService.class); /** * Service state: initially {@link STATE#NOTINITED}. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CompositeService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CompositeService.java index 897911872b80f..53b355339e35a 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CompositeService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CompositeService.java @@ -23,9 +23,9 @@ import java.util.Collections; import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * CompositeService. @@ -33,7 +33,7 @@ */ public class CompositeService extends AbstractService { - private static final Log LOG = LogFactory.getLog(CompositeService.class); + private static final Logger LOG = LoggerFactory.getLogger(CompositeService.class); private final List serviceList = new ArrayList(); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CookieSigner.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CookieSigner.java index ee51c24351c3d..9c8bd563268bc 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CookieSigner.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/CookieSigner.java @@ -18,13 +18,13 @@ package org.apache.hive.service; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; - import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * The cookie signer generates a signature based on SHA digest * and appends it to the cookie value generated at the @@ -32,9 +32,9 @@ */ public class CookieSigner { private static final String SIGNATURE = "&s="; - private static final String SHA_STRING = "SHA"; + private static final String SHA_STRING = "SHA-256"; private byte[] secretBytes; - private static final Log LOG = LogFactory.getLog(CookieSigner.class); + private static final Logger LOG = LoggerFactory.getLogger(CookieSigner.class); /** * Constructor diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceOperations.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceOperations.java index f16863c1b41aa..2fb2e92942110 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceOperations.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceOperations.java @@ -18,16 +18,16 @@ package org.apache.hive.service; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ServiceOperations. * */ public final class ServiceOperations { - private static final Log LOG = LogFactory.getLog(ServiceOperations.class); + private static final Logger LOG = LoggerFactory.getLogger(ServiceOperations.class); private ServiceOperations() { } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceUtils.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceUtils.java index edb5eff9615bf..608e207c456ea 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceUtils.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/ServiceUtils.java @@ -17,6 +17,10 @@ */ package org.apache.hive.service; +import java.io.IOException; + +import org.slf4j.Logger; + public class ServiceUtils { /* @@ -41,4 +45,26 @@ public static int indexOfDomainMatch(String userName) { } return endIdx; } + + /** + * Close the Closeable objects and ignore any {@link IOException} or + * null pointers. Must only be used for cleanup in exception handlers. + * + * @param log the log to record problems to at debug level. Can be null. + * @param closeables the objects to close + */ + public static void cleanup(Logger log, java.io.Closeable... closeables) { + for (java.io.Closeable c : closeables) { + if (c != null) { + try { + c.close(); + } catch(IOException e) { + if (log != null && log.isDebugEnabled()) { + log.debug("Exception in closing " + c, e); + } + } + } + } + } + } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java index 10000f12ab329..0ef8ef28f1162 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java @@ -42,6 +42,7 @@ import org.apache.hadoop.hive.shims.HadoopShims.KerberosNameShim; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.hive.thrift.DBTokenStore; +import org.apache.hadoop.hive.thrift.HiveDelegationTokenManager; import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge; import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.Server.ServerMode; import org.apache.hadoop.security.SecurityUtil; @@ -91,6 +92,7 @@ public String getAuthName() { private String authTypeStr; private final String transportMode; private final HiveConf conf; + private HiveDelegationTokenManager delegationTokenManager = null; public static final String HS2_PROXY_USER = "hive.server2.proxy.user"; public static final String HS2_CLIENT_TOKEN = "hiveserver2ClientToken"; @@ -144,10 +146,12 @@ public HiveAuthFactory(HiveConf conf) throws TTransportException, IOException { } // start delegation token manager + delegationTokenManager = new HiveDelegationTokenManager(); try { // rawStore is only necessary for DBTokenStore Object rawStore = null; - String tokenStoreClass = conf.getVar(HiveConf.ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS); + String tokenStoreClass = conf.getVar( + HiveConf.ConfVars.METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS); if (tokenStoreClass.equals(DBTokenStore.class.getName())) { HMSHandler baseHandler = new HiveMetaStore.HMSHandler( @@ -155,7 +159,9 @@ public HiveAuthFactory(HiveConf conf) throws TTransportException, IOException { rawStore = baseHandler.getMS(); } - saslServer.startDelegationTokenSecretManager(conf, rawStore, ServerMode.HIVESERVER2); + delegationTokenManager.startDelegationTokenSecretManager( + conf, rawStore, ServerMode.HIVESERVER2); + saslServer.setSecretManager(delegationTokenManager.getSecretManager()); } catch (MetaException|IOException e) { throw new TTransportException("Failed to start token manager", e); @@ -312,14 +318,16 @@ public static TServerSocket getServerSSLSocket(String hiveHost, int portNum, Str } // retrieve delegation token for the given user - public String getDelegationToken(String owner, String renewer) throws HiveSQLException { - if (saslServer == null) { + public String getDelegationToken(String owner, String renewer, String remoteAddr) + throws HiveSQLException { + if (delegationTokenManager == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { - String tokenStr = saslServer.getDelegationTokenWithService(owner, renewer, HS2_CLIENT_TOKEN); + String tokenStr = delegationTokenManager.getDelegationTokenWithService(owner, renewer, + HS2_CLIENT_TOKEN, remoteAddr); if (tokenStr == null || tokenStr.isEmpty()) { throw new HiveSQLException( "Received empty retrieving delegation token for user " + owner, "08S01"); @@ -335,12 +343,12 @@ public String getDelegationToken(String owner, String renewer) throws HiveSQLExc // cancel given delegation token public void cancelDelegationToken(String delegationToken) throws HiveSQLException { - if (saslServer == null) { + if (delegationTokenManager == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { - saslServer.cancelDelegationToken(delegationToken); + delegationTokenManager.cancelDelegationToken(delegationToken); } catch (IOException e) { throw new HiveSQLException( "Error canceling delegation token " + delegationToken, "08S01", e); @@ -348,25 +356,39 @@ public void cancelDelegationToken(String delegationToken) throws HiveSQLExceptio } public void renewDelegationToken(String delegationToken) throws HiveSQLException { - if (saslServer == null) { + if (delegationTokenManager == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { - saslServer.renewDelegationToken(delegationToken); + delegationTokenManager.renewDelegationToken(delegationToken); } catch (IOException e) { throw new HiveSQLException( "Error renewing delegation token " + delegationToken, "08S01", e); } } + public String verifyDelegationToken(String delegationToken) throws HiveSQLException { + if (delegationTokenManager == null) { + throw new HiveSQLException( + "Delegation token only supported over kerberos authentication", "08S01"); + } + try { + return delegationTokenManager.verifyDelegationToken(delegationToken); + } catch (IOException e) { + String msg = "Error verifying delegation token " + delegationToken; + LOG.error(msg, e); + throw new HiveSQLException(msg, "08S01", e); + } + } + public String getUserFromToken(String delegationToken) throws HiveSQLException { - if (saslServer == null) { + if (delegationTokenManager == null) { throw new HiveSQLException( "Delegation token only supported over kerberos authentication", "08S01"); } try { - return saslServer.getUserFromToken(delegationToken); + return delegationTokenManager.getUserFromToken(delegationToken); } catch (IOException e) { throw new HiveSQLException( "Error extracting user from delegation token " + delegationToken, "08S01", e); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java index f7375ee707830..b0da86c34ee1d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/HttpAuthUtils.java @@ -32,8 +32,6 @@ import javax.security.auth.Subject; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.security.UserGroupInformation; import org.apache.http.protocol.BasicHttpContext; @@ -42,6 +40,8 @@ import org.ietf.jgss.GSSManager; import org.ietf.jgss.GSSName; import org.ietf.jgss.Oid; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Utility functions for HTTP mode authentication. @@ -51,7 +51,7 @@ public final class HttpAuthUtils { public static final String AUTHORIZATION = "Authorization"; public static final String BASIC = "Basic"; public static final String NEGOTIATE = "Negotiate"; - private static final Log LOG = LogFactory.getLog(HttpAuthUtils.class); + private static final Logger LOG = LoggerFactory.getLogger(HttpAuthUtils.class); private static final String COOKIE_ATTR_SEPARATOR = "&"; private static final String COOKIE_CLIENT_USER_NAME = "cu"; private static final String COOKIE_CLIENT_RAND_NUMBER = "rn"; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java index 52eb752f1e026..cb9595009ecf6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/KerberosSaslHelper.java @@ -24,9 +24,9 @@ import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge; import org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.Server; -import org.apache.hive.service.cli.thrift.TCLIService; -import org.apache.hive.service.cli.thrift.TCLIService.Iface; import org.apache.hive.service.cli.thrift.ThriftCLIService; +import org.apache.hive.service.rpc.thrift.TCLIService; +import org.apache.hive.service.rpc.thrift.TCLIService.Iface; import org.apache.thrift.TProcessor; import org.apache.thrift.TProcessorFactory; import org.apache.thrift.transport.TSaslClientTransport; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java index afc144199f1e8..80ab3f8b24658 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/PlainSaslHelper.java @@ -32,8 +32,8 @@ import org.apache.hive.service.auth.AuthenticationProviderFactory.AuthMethods; import org.apache.hive.service.auth.PlainSaslServer.SaslPlainProvider; -import org.apache.hive.service.cli.thrift.TCLIService.Iface; import org.apache.hive.service.cli.thrift.ThriftCLIService; +import org.apache.hive.service.rpc.thrift.TCLIService.Iface; import org.apache.thrift.TProcessor; import org.apache.thrift.TProcessorFactory; import org.apache.thrift.transport.TSaslClientTransport; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java index 9a61ad49942c8..91a30cdefaecc 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/auth/TSetIpAddressProcessor.java @@ -18,8 +18,8 @@ package org.apache.hive.service.auth; -import org.apache.hive.service.cli.thrift.TCLIService; -import org.apache.hive.service.cli.thrift.TCLIService.Iface; +import org.apache.hive.service.rpc.thrift.TCLIService; +import org.apache.hive.service.rpc.thrift.TCLIService.Iface; import org.apache.thrift.TException; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TSaslClientTransport; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/CLIService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/CLIService.java index 791ddcbd2c5b6..bdc1e6251e560 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/CLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/CLIService.java @@ -28,8 +28,6 @@ import javax.security.auth.login.LoginException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.metastore.HiveMetaStoreClient; @@ -45,9 +43,12 @@ import org.apache.hive.service.ServiceException; import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.cli.operation.Operation; +import org.apache.hive.service.cli.session.HiveSession; import org.apache.hive.service.cli.session.SessionManager; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; import org.apache.hive.service.server.HiveServer2; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * CLIService. @@ -62,7 +63,7 @@ public class CLIService extends CompositeService implements ICLIService { SERVER_VERSION = protocols[protocols.length - 1]; } - private final Log LOG = LogFactory.getLog(CLIService.class.getName()); + private final Logger LOG = LoggerFactory.getLogger(CLIService.class.getName()); private HiveConf hiveConf; private SessionManager sessionManager; @@ -256,23 +257,57 @@ public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType getInfoType */ @Override public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, - Map confOverlay) - throws HiveSQLException { - OperationHandle opHandle = sessionManager.getSession(sessionHandle) - .executeStatement(statement, confOverlay); + Map confOverlay) throws HiveSQLException { + HiveSession session = sessionManager.getSession(sessionHandle); + // need to reset the monitor, as operation handle is not available down stream, Ideally the + // monitor should be associated with the operation handle. + session.getSessionState().updateProgressMonitor(null); + OperationHandle opHandle = session.executeStatement(statement, confOverlay); LOG.debug(sessionHandle + ": executeStatement()"); return opHandle; } - /* (non-Javadoc) - * @see org.apache.hive.service.cli.ICLIService#executeStatementAsync(org.apache.hive.service.cli.SessionHandle, - * java.lang.String, java.util.Map) + /** + * Execute statement on the server with a timeout. This is a blocking call. + */ + @Override + public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, + Map confOverlay, long queryTimeout) throws HiveSQLException { + HiveSession session = sessionManager.getSession(sessionHandle); + // need to reset the monitor, as operation handle is not available down stream, Ideally the + // monitor should be associated with the operation handle. + session.getSessionState().updateProgressMonitor(null); + OperationHandle opHandle = session.executeStatement(statement, confOverlay, queryTimeout); + LOG.debug(sessionHandle + ": executeStatement()"); + return opHandle; + } + + /** + * Execute statement asynchronously on the server. This is a non-blocking call */ @Override public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, Map confOverlay) throws HiveSQLException { - OperationHandle opHandle = sessionManager.getSession(sessionHandle) - .executeStatementAsync(statement, confOverlay); + HiveSession session = sessionManager.getSession(sessionHandle); + // need to reset the monitor, as operation handle is not available down stream, Ideally the + // monitor should be associated with the operation handle. + session.getSessionState().updateProgressMonitor(null); + OperationHandle opHandle = session.executeStatementAsync(statement, confOverlay); + LOG.debug(sessionHandle + ": executeStatementAsync()"); + return opHandle; + } + + /** + * Execute statement asynchronously on the server with a timeout. This is a non-blocking call + */ + @Override + public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, + Map confOverlay, long queryTimeout) throws HiveSQLException { + HiveSession session = sessionManager.getSession(sessionHandle); + // need to reset the monitor, as operation handle is not available down stream, Ideally the + // monitor should be associated with the operation handle. + session.getSessionState().updateProgressMonitor(null); + OperationHandle opHandle = session.executeStatementAsync(statement, confOverlay, queryTimeout); LOG.debug(sessionHandle + ": executeStatementAsync()"); return opHandle; } @@ -366,6 +401,33 @@ public OperationHandle getFunctions(SessionHandle sessionHandle, return opHandle; } + /* (non-Javadoc) + * @see org.apache.hive.service.cli.ICLIService#getPrimaryKeys(org.apache.hive.service.cli.SessionHandle) + */ + @Override + public OperationHandle getPrimaryKeys(SessionHandle sessionHandle, + String catalog, String schema, String table) throws HiveSQLException { + OperationHandle opHandle = sessionManager.getSession(sessionHandle) + .getPrimaryKeys(catalog, schema, table); + LOG.debug(sessionHandle + ": getPrimaryKeys()"); + return opHandle; + } + + /* (non-Javadoc) + * @see org.apache.hive.service.cli.ICLIService#getCrossReference(org.apache.hive.service.cli.SessionHandle) + */ + @Override + public OperationHandle getCrossReference(SessionHandle sessionHandle, + String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, + String foreignSchema, String foreignTable) throws HiveSQLException { + OperationHandle opHandle = sessionManager.getSession(sessionHandle) + .getCrossReference(primaryCatalog, primarySchema, primaryTable, + foreignCatalog, + foreignSchema, foreignTable); + LOG.debug(sessionHandle + ": getCrossReference()"); + return opHandle; + } + /* (non-Javadoc) * @see org.apache.hive.service.cli.ICLIService#getOperationStatus(org.apache.hive.service.cli.OperationHandle) */ @@ -404,6 +466,10 @@ public OperationStatus getOperationStatus(OperationHandle opHandle) return opStatus; } + public HiveConf getSessionConf(SessionHandle sessionHandle) throws HiveSQLException { + return sessionManager.getSession(sessionHandle).getHiveConf(); + } + /* (non-Javadoc) * @see org.apache.hive.service.cli.ICLIService#cancelOperation(org.apache.hive.service.cli.OperationHandle) */ diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Column.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Column.java deleted file mode 100644 index 26d0f718f383a..0000000000000 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Column.java +++ /dev/null @@ -1,423 +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. - */ - -package org.apache.hive.service.cli; - -import java.nio.ByteBuffer; -import java.util.AbstractList; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.BitSet; -import java.util.List; - -import com.google.common.primitives.Booleans; -import com.google.common.primitives.Bytes; -import com.google.common.primitives.Doubles; -import com.google.common.primitives.Ints; -import com.google.common.primitives.Longs; -import com.google.common.primitives.Shorts; -import org.apache.hive.service.cli.thrift.TBinaryColumn; -import org.apache.hive.service.cli.thrift.TBoolColumn; -import org.apache.hive.service.cli.thrift.TByteColumn; -import org.apache.hive.service.cli.thrift.TColumn; -import org.apache.hive.service.cli.thrift.TDoubleColumn; -import org.apache.hive.service.cli.thrift.TI16Column; -import org.apache.hive.service.cli.thrift.TI32Column; -import org.apache.hive.service.cli.thrift.TI64Column; -import org.apache.hive.service.cli.thrift.TStringColumn; - -/** - * Column. - */ -public class Column extends AbstractList { - - private static final int DEFAULT_SIZE = 100; - - private final Type type; - - private BitSet nulls; - - private int size; - private boolean[] boolVars; - private byte[] byteVars; - private short[] shortVars; - private int[] intVars; - private long[] longVars; - private double[] doubleVars; - private List stringVars; - private List binaryVars; - - public Column(Type type, BitSet nulls, Object values) { - this.type = type; - this.nulls = nulls; - if (type == Type.BOOLEAN_TYPE) { - boolVars = (boolean[]) values; - size = boolVars.length; - } else if (type == Type.TINYINT_TYPE) { - byteVars = (byte[]) values; - size = byteVars.length; - } else if (type == Type.SMALLINT_TYPE) { - shortVars = (short[]) values; - size = shortVars.length; - } else if (type == Type.INT_TYPE) { - intVars = (int[]) values; - size = intVars.length; - } else if (type == Type.BIGINT_TYPE) { - longVars = (long[]) values; - size = longVars.length; - } else if (type == Type.DOUBLE_TYPE) { - doubleVars = (double[]) values; - size = doubleVars.length; - } else if (type == Type.BINARY_TYPE) { - binaryVars = (List) values; - size = binaryVars.size(); - } else if (type == Type.STRING_TYPE) { - stringVars = (List) values; - size = stringVars.size(); - } else { - throw new IllegalStateException("invalid union object"); - } - } - - public Column(Type type) { - nulls = new BitSet(); - switch (type) { - case BOOLEAN_TYPE: - boolVars = new boolean[DEFAULT_SIZE]; - break; - case TINYINT_TYPE: - byteVars = new byte[DEFAULT_SIZE]; - break; - case SMALLINT_TYPE: - shortVars = new short[DEFAULT_SIZE]; - break; - case INT_TYPE: - intVars = new int[DEFAULT_SIZE]; - break; - case BIGINT_TYPE: - longVars = new long[DEFAULT_SIZE]; - break; - case FLOAT_TYPE: - case DOUBLE_TYPE: - type = Type.DOUBLE_TYPE; - doubleVars = new double[DEFAULT_SIZE]; - break; - case BINARY_TYPE: - binaryVars = new ArrayList(); - break; - default: - type = Type.STRING_TYPE; - stringVars = new ArrayList(); - } - this.type = type; - } - - public Column(TColumn colValues) { - if (colValues.isSetBoolVal()) { - type = Type.BOOLEAN_TYPE; - nulls = toBitset(colValues.getBoolVal().getNulls()); - boolVars = Booleans.toArray(colValues.getBoolVal().getValues()); - size = boolVars.length; - } else if (colValues.isSetByteVal()) { - type = Type.TINYINT_TYPE; - nulls = toBitset(colValues.getByteVal().getNulls()); - byteVars = Bytes.toArray(colValues.getByteVal().getValues()); - size = byteVars.length; - } else if (colValues.isSetI16Val()) { - type = Type.SMALLINT_TYPE; - nulls = toBitset(colValues.getI16Val().getNulls()); - shortVars = Shorts.toArray(colValues.getI16Val().getValues()); - size = shortVars.length; - } else if (colValues.isSetI32Val()) { - type = Type.INT_TYPE; - nulls = toBitset(colValues.getI32Val().getNulls()); - intVars = Ints.toArray(colValues.getI32Val().getValues()); - size = intVars.length; - } else if (colValues.isSetI64Val()) { - type = Type.BIGINT_TYPE; - nulls = toBitset(colValues.getI64Val().getNulls()); - longVars = Longs.toArray(colValues.getI64Val().getValues()); - size = longVars.length; - } else if (colValues.isSetDoubleVal()) { - type = Type.DOUBLE_TYPE; - nulls = toBitset(colValues.getDoubleVal().getNulls()); - doubleVars = Doubles.toArray(colValues.getDoubleVal().getValues()); - size = doubleVars.length; - } else if (colValues.isSetBinaryVal()) { - type = Type.BINARY_TYPE; - nulls = toBitset(colValues.getBinaryVal().getNulls()); - binaryVars = colValues.getBinaryVal().getValues(); - size = binaryVars.size(); - } else if (colValues.isSetStringVal()) { - type = Type.STRING_TYPE; - nulls = toBitset(colValues.getStringVal().getNulls()); - stringVars = colValues.getStringVal().getValues(); - size = stringVars.size(); - } else { - throw new IllegalStateException("invalid union object"); - } - } - - public Column extractSubset(int start, int end) { - BitSet subNulls = nulls.get(start, end); - if (type == Type.BOOLEAN_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(boolVars, start, end)); - boolVars = Arrays.copyOfRange(boolVars, end, size); - nulls = nulls.get(start, size); - size = boolVars.length; - return subset; - } - if (type == Type.TINYINT_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(byteVars, start, end)); - byteVars = Arrays.copyOfRange(byteVars, end, size); - nulls = nulls.get(start, size); - size = byteVars.length; - return subset; - } - if (type == Type.SMALLINT_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(shortVars, start, end)); - shortVars = Arrays.copyOfRange(shortVars, end, size); - nulls = nulls.get(start, size); - size = shortVars.length; - return subset; - } - if (type == Type.INT_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(intVars, start, end)); - intVars = Arrays.copyOfRange(intVars, end, size); - nulls = nulls.get(start, size); - size = intVars.length; - return subset; - } - if (type == Type.BIGINT_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(longVars, start, end)); - longVars = Arrays.copyOfRange(longVars, end, size); - nulls = nulls.get(start, size); - size = longVars.length; - return subset; - } - if (type == Type.DOUBLE_TYPE) { - Column subset = new Column(type, subNulls, Arrays.copyOfRange(doubleVars, start, end)); - doubleVars = Arrays.copyOfRange(doubleVars, end, size); - nulls = nulls.get(start, size); - size = doubleVars.length; - return subset; - } - if (type == Type.BINARY_TYPE) { - Column subset = new Column(type, subNulls, binaryVars.subList(start, end)); - binaryVars = binaryVars.subList(end, binaryVars.size()); - nulls = nulls.get(start, size); - size = binaryVars.size(); - return subset; - } - if (type == Type.STRING_TYPE) { - Column subset = new Column(type, subNulls, stringVars.subList(start, end)); - stringVars = stringVars.subList(end, stringVars.size()); - nulls = nulls.get(start, size); - size = stringVars.size(); - return subset; - } - throw new IllegalStateException("invalid union object"); - } - - private static final byte[] MASKS = new byte[] { - 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, (byte)0x80 - }; - - private static BitSet toBitset(byte[] nulls) { - BitSet bitset = new BitSet(); - int bits = nulls.length * 8; - for (int i = 0; i < bits; i++) { - bitset.set(i, (nulls[i / 8] & MASKS[i % 8]) != 0); - } - return bitset; - } - - private static byte[] toBinary(BitSet bitset) { - byte[] nulls = new byte[1 + (bitset.length() / 8)]; - for (int i = 0; i < bitset.length(); i++) { - nulls[i / 8] |= bitset.get(i) ? MASKS[i % 8] : 0; - } - return nulls; - } - - public Type getType() { - return type; - } - - @Override - public Object get(int index) { - if (nulls.get(index)) { - return null; - } - switch (type) { - case BOOLEAN_TYPE: - return boolVars[index]; - case TINYINT_TYPE: - return byteVars[index]; - case SMALLINT_TYPE: - return shortVars[index]; - case INT_TYPE: - return intVars[index]; - case BIGINT_TYPE: - return longVars[index]; - case DOUBLE_TYPE: - return doubleVars[index]; - case STRING_TYPE: - return stringVars.get(index); - case BINARY_TYPE: - return binaryVars.get(index).array(); - } - return null; - } - - @Override - public int size() { - return size; - } - - public TColumn toTColumn() { - TColumn value = new TColumn(); - ByteBuffer nullMasks = ByteBuffer.wrap(toBinary(nulls)); - switch (type) { - case BOOLEAN_TYPE: - value.setBoolVal(new TBoolColumn(Booleans.asList(Arrays.copyOfRange(boolVars, 0, size)), nullMasks)); - break; - case TINYINT_TYPE: - value.setByteVal(new TByteColumn(Bytes.asList(Arrays.copyOfRange(byteVars, 0, size)), nullMasks)); - break; - case SMALLINT_TYPE: - value.setI16Val(new TI16Column(Shorts.asList(Arrays.copyOfRange(shortVars, 0, size)), nullMasks)); - break; - case INT_TYPE: - value.setI32Val(new TI32Column(Ints.asList(Arrays.copyOfRange(intVars, 0, size)), nullMasks)); - break; - case BIGINT_TYPE: - value.setI64Val(new TI64Column(Longs.asList(Arrays.copyOfRange(longVars, 0, size)), nullMasks)); - break; - case DOUBLE_TYPE: - value.setDoubleVal(new TDoubleColumn(Doubles.asList(Arrays.copyOfRange(doubleVars, 0, size)), nullMasks)); - break; - case STRING_TYPE: - value.setStringVal(new TStringColumn(stringVars, nullMasks)); - break; - case BINARY_TYPE: - value.setBinaryVal(new TBinaryColumn(binaryVars, nullMasks)); - break; - } - return value; - } - - private static final ByteBuffer EMPTY_BINARY = ByteBuffer.allocate(0); - private static final String EMPTY_STRING = ""; - - public void addValue(Type type, Object field) { - switch (type) { - case BOOLEAN_TYPE: - nulls.set(size, field == null); - boolVars()[size] = field == null ? true : (Boolean)field; - break; - case TINYINT_TYPE: - nulls.set(size, field == null); - byteVars()[size] = field == null ? 0 : (Byte) field; - break; - case SMALLINT_TYPE: - nulls.set(size, field == null); - shortVars()[size] = field == null ? 0 : (Short)field; - break; - case INT_TYPE: - nulls.set(size, field == null); - intVars()[size] = field == null ? 0 : (Integer)field; - break; - case BIGINT_TYPE: - nulls.set(size, field == null); - longVars()[size] = field == null ? 0 : (Long)field; - break; - case FLOAT_TYPE: - nulls.set(size, field == null); - doubleVars()[size] = field == null ? 0 : Double.valueOf(field.toString()); - break; - case DOUBLE_TYPE: - nulls.set(size, field == null); - doubleVars()[size] = field == null ? 0 : (Double)field; - break; - case BINARY_TYPE: - nulls.set(binaryVars.size(), field == null); - binaryVars.add(field == null ? EMPTY_BINARY : ByteBuffer.wrap((byte[])field)); - break; - default: - nulls.set(stringVars.size(), field == null); - stringVars.add(field == null ? EMPTY_STRING : String.valueOf(field)); - break; - } - size++; - } - - private boolean[] boolVars() { - if (boolVars.length == size) { - boolean[] newVars = new boolean[size << 1]; - System.arraycopy(boolVars, 0, newVars, 0, size); - return boolVars = newVars; - } - return boolVars; - } - - private byte[] byteVars() { - if (byteVars.length == size) { - byte[] newVars = new byte[size << 1]; - System.arraycopy(byteVars, 0, newVars, 0, size); - return byteVars = newVars; - } - return byteVars; - } - - private short[] shortVars() { - if (shortVars.length == size) { - short[] newVars = new short[size << 1]; - System.arraycopy(shortVars, 0, newVars, 0, size); - return shortVars = newVars; - } - return shortVars; - } - - private int[] intVars() { - if (intVars.length == size) { - int[] newVars = new int[size << 1]; - System.arraycopy(intVars, 0, newVars, 0, size); - return intVars = newVars; - } - return intVars; - } - - private long[] longVars() { - if (longVars.length == size) { - long[] newVars = new long[size << 1]; - System.arraycopy(longVars, 0, newVars, 0, size); - return longVars = newVars; - } - return longVars; - } - - private double[] doubleVars() { - if (doubleVars.length == size) { - double[] newVars = new double[size << 1]; - System.arraycopy(doubleVars, 0, newVars, 0, size); - return doubleVars = newVars; - } - return doubleVars; - } -} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java index 47a582e2223e4..55460606f2ad6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java @@ -18,13 +18,23 @@ package org.apache.hive.service.cli; +import java.io.ByteArrayInputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.apache.hive.service.cli.thrift.TColumn; -import org.apache.hive.service.cli.thrift.TRow; -import org.apache.hive.service.cli.thrift.TRowSet; +import org.apache.hadoop.hive.common.type.HiveDecimal; +import org.apache.hadoop.hive.serde2.thrift.ColumnBuffer; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.rpc.thrift.TColumn; +import org.apache.hive.service.rpc.thrift.TRow; +import org.apache.hive.service.rpc.thrift.TRowSet; +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TCompactProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TIOStreamTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ColumnBasedSet. @@ -33,41 +43,80 @@ public class ColumnBasedSet implements RowSet { private long startOffset; - private final Type[] types; // non-null only for writing (server-side) - private final List columns; + private final TypeDescriptor[] descriptors; // non-null only for writing (server-side) + private final List columns; + private byte[] blob; + private boolean isBlobBased = false; + public static final Logger LOG = LoggerFactory.getLogger(ColumnBasedSet.class); public ColumnBasedSet(TableSchema schema) { - types = schema.toTypes(); - columns = new ArrayList(); + descriptors = schema.toTypeDescriptors(); + columns = new ArrayList(); for (ColumnDescriptor colDesc : schema.getColumnDescriptors()) { - columns.add(new Column(colDesc.getType())); + columns.add(new ColumnBuffer(colDesc.getType())); } } - public ColumnBasedSet(TRowSet tRowSet) { - types = null; - columns = new ArrayList(); - for (TColumn tvalue : tRowSet.getColumns()) { - columns.add(new Column(tvalue)); + public ColumnBasedSet(TRowSet tRowSet) throws TException { + descriptors = null; + columns = new ArrayList(); + // Use TCompactProtocol to read serialized TColumns + if (tRowSet.isSetBinaryColumns()) { + TProtocol protocol = + new TCompactProtocol(new TIOStreamTransport(new ByteArrayInputStream( + tRowSet.getBinaryColumns()))); + // Read from the stream using the protocol for each column in final schema + for (int i = 0; i < tRowSet.getColumnCount(); i++) { + TColumn tvalue = new TColumn(); + try { + tvalue.read(protocol); + } catch (TException e) { + LOG.error(e.getMessage(), e); + throw new TException("Error reading column value from the row set blob", e); + } + columns.add(new ColumnBuffer(tvalue)); + } + } + else { + if (tRowSet.getColumns() != null) { + for (TColumn tvalue : tRowSet.getColumns()) { + columns.add(new ColumnBuffer(tvalue)); + } + } } startOffset = tRowSet.getStartRowOffset(); } - private ColumnBasedSet(Type[] types, List columns, long startOffset) { - this.types = types; + private ColumnBasedSet(TypeDescriptor[] descriptors, List columns, long startOffset) { + this.descriptors = descriptors; this.columns = columns; this.startOffset = startOffset; } + public ColumnBasedSet(TableSchema schema, boolean isBlobBased) { + this(schema); + this.isBlobBased = isBlobBased; + } + @Override public ColumnBasedSet addRow(Object[] fields) { - for (int i = 0; i < fields.length; i++) { - columns.get(i).addValue(types[i], fields[i]); + if (isBlobBased) { + this.blob = (byte[]) fields[0]; + } else { + for (int i = 0; i < fields.length; i++) { + TypeDescriptor descriptor = descriptors[i]; + Object field = fields[i]; + if (field != null && descriptor.getType() == Type.DECIMAL_TYPE) { + int scale = descriptor.getDecimalDigits(); + field = ((HiveDecimal) field).toFormatString(scale); + } + columns.get(i).addValue(descriptor.getType(), field); + } } return this; } - public List getColumns() { + public List getColumns() { return columns; } @@ -85,11 +134,11 @@ public int numRows() { public ColumnBasedSet extractSubset(int maxRows) { int numRows = Math.min(numRows(), maxRows); - List subset = new ArrayList(); + List subset = new ArrayList(); for (int i = 0; i < columns.size(); i++) { - subset.add(columns.get(i).extractSubset(0, numRows)); + subset.add(columns.get(i).extractSubset(numRows)); } - ColumnBasedSet result = new ColumnBasedSet(types, subset, startOffset); + ColumnBasedSet result = new ColumnBasedSet(descriptors, subset, startOffset); startOffset += numRows; return result; } @@ -106,8 +155,14 @@ public void setStartOffset(long startOffset) { public TRowSet toTRowSet() { TRowSet tRowSet = new TRowSet(startOffset, new ArrayList()); - for (int i = 0; i < columns.size(); i++) { - tRowSet.addToColumns(columns.get(i).toTColumn()); + if (isBlobBased) { + tRowSet.setColumns(null); + tRowSet.setBinaryColumns(blob); + tRowSet.setColumnCount(numColumns()); + } else { + for (int i = 0; i < columns.size(); i++) { + tRowSet.addToColumns(columns.get(i).toTColumn()); + } } return tRowSet; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java index f0bbf14693160..d8e61a87e7f62 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnDescriptor.java @@ -18,8 +18,8 @@ package org.apache.hive.service.cli; -import org.apache.hadoop.hive.metastore.api.FieldSchema; -import org.apache.hive.service.cli.thrift.TColumnDesc; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.rpc.thrift.TColumnDesc; /** @@ -47,13 +47,6 @@ public ColumnDescriptor(TColumnDesc tColumnDesc) { position = tColumnDesc.getPosition(); } - public ColumnDescriptor(FieldSchema column, int position) { - name = column.getName(); - comment = column.getComment(); - type = new TypeDescriptor(column.getType()); - this.position = position; - } - public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnValue.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnValue.java index 40144cfe33fa3..28149e1e5edb5 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnValue.java @@ -27,14 +27,15 @@ import org.apache.hadoop.hive.common.type.HiveIntervalDayTime; import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth; import org.apache.hadoop.hive.common.type.HiveVarchar; -import org.apache.hive.service.cli.thrift.TBoolValue; -import org.apache.hive.service.cli.thrift.TByteValue; -import org.apache.hive.service.cli.thrift.TColumnValue; -import org.apache.hive.service.cli.thrift.TDoubleValue; -import org.apache.hive.service.cli.thrift.TI16Value; -import org.apache.hive.service.cli.thrift.TI32Value; -import org.apache.hive.service.cli.thrift.TI64Value; -import org.apache.hive.service.cli.thrift.TStringValue; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.rpc.thrift.TBoolValue; +import org.apache.hive.service.rpc.thrift.TByteValue; +import org.apache.hive.service.rpc.thrift.TColumnValue; +import org.apache.hive.service.rpc.thrift.TDoubleValue; +import org.apache.hive.service.rpc.thrift.TI16Value; +import org.apache.hive.service.rpc.thrift.TI32Value; +import org.apache.hive.service.rpc.thrift.TI64Value; +import org.apache.hive.service.rpc.thrift.TStringValue; /** * Protocols before HIVE_CLI_SERVICE_PROTOCOL_V6 (used by RowBasedSet) @@ -138,10 +139,11 @@ private static TColumnValue timestampValue(Timestamp value) { return TColumnValue.stringVal(tStringValue); } - private static TColumnValue stringValue(HiveDecimal value) { + private static TColumnValue stringValue(HiveDecimal value, TypeDescriptor typeDescriptor) { TStringValue tStrValue = new TStringValue(); if (value != null) { - tStrValue.setValue(value.toString()); + int scale = typeDescriptor.getDecimalDigits(); + tStrValue.setValue(value.toFormatString(scale)); } return TColumnValue.stringVal(tStrValue); } @@ -162,7 +164,9 @@ private static TColumnValue stringValue(HiveIntervalDayTime value) { return TColumnValue.stringVal(tStrValue); } - public static TColumnValue toTColumnValue(Type type, Object value) { + public static TColumnValue toTColumnValue(TypeDescriptor typeDescriptor, Object value) { + Type type = typeDescriptor.getType(); + switch (type) { case BOOLEAN_TYPE: return booleanValue((Boolean)value); @@ -193,7 +197,7 @@ public static TColumnValue toTColumnValue(Type type, Object value) { case INTERVAL_DAY_TIME_TYPE: return stringValue((HiveIntervalDayTime) value); case DECIMAL_TYPE: - return stringValue(((HiveDecimal)value)); + return stringValue((HiveDecimal)value, typeDescriptor); case BINARY_TYPE: return stringValue((String)value); case ARRAY_TYPE: @@ -202,6 +206,8 @@ public static TColumnValue toTColumnValue(Type type, Object value) { case UNION_TYPE: case USER_DEFINED_TYPE: return stringValue((String)value); + case NULL_TYPE: + return stringValue((String)value); default: return null; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java deleted file mode 100644 index 9cad5be198c06..0000000000000 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/EmbeddedCLIServiceClient.java +++ /dev/null @@ -1,208 +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. - */ - -package org.apache.hive.service.cli; - -import java.util.List; -import java.util.Map; - -import org.apache.hive.service.auth.HiveAuthFactory; - - -/** - * EmbeddedCLIServiceClient. - * - */ -public class EmbeddedCLIServiceClient extends CLIServiceClient { - private final ICLIService cliService; - - public EmbeddedCLIServiceClient(ICLIService cliService) { - this.cliService = cliService; - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#openSession(java.lang.String, java.lang.String, java.util.Map) - */ - @Override - public SessionHandle openSession(String username, String password, - Map configuration) throws HiveSQLException { - return cliService.openSession(username, password, configuration); - } - - @Override - public SessionHandle openSessionWithImpersonation(String username, String password, - Map configuration, String delegationToken) throws HiveSQLException { - throw new HiveSQLException("Impersonated session is not supported in the embedded mode"); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#closeSession(org.apache.hive.service.cli.SessionHandle) - */ - @Override - public void closeSession(SessionHandle sessionHandle) throws HiveSQLException { - cliService.closeSession(sessionHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getInfo(org.apache.hive.service.cli.SessionHandle, java.util.List) - */ - @Override - public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType getInfoType) - throws HiveSQLException { - return cliService.getInfo(sessionHandle, getInfoType); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#executeStatement(org.apache.hive.service.cli.SessionHandle, - * java.lang.String, java.util.Map) - */ - @Override - public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, - Map confOverlay) throws HiveSQLException { - return cliService.executeStatement(sessionHandle, statement, confOverlay); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#executeStatementAsync(org.apache.hive.service.cli.SessionHandle, - * java.lang.String, java.util.Map) - */ - @Override - public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, - Map confOverlay) throws HiveSQLException { - return cliService.executeStatementAsync(sessionHandle, statement, confOverlay); - } - - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getTypeInfo(org.apache.hive.service.cli.SessionHandle) - */ - @Override - public OperationHandle getTypeInfo(SessionHandle sessionHandle) throws HiveSQLException { - return cliService.getTypeInfo(sessionHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getCatalogs(org.apache.hive.service.cli.SessionHandle) - */ - @Override - public OperationHandle getCatalogs(SessionHandle sessionHandle) throws HiveSQLException { - return cliService.getCatalogs(sessionHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getSchemas(org.apache.hive.service.cli.SessionHandle, java.lang.String, java.lang.String) - */ - @Override - public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName, - String schemaName) throws HiveSQLException { - return cliService.getSchemas(sessionHandle, catalogName, schemaName); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getTables(org.apache.hive.service.cli.SessionHandle, java.lang.String, java.lang.String, java.lang.String, java.util.List) - */ - @Override - public OperationHandle getTables(SessionHandle sessionHandle, String catalogName, - String schemaName, String tableName, List tableTypes) throws HiveSQLException { - return cliService.getTables(sessionHandle, catalogName, schemaName, tableName, tableTypes); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getTableTypes(org.apache.hive.service.cli.SessionHandle) - */ - @Override - public OperationHandle getTableTypes(SessionHandle sessionHandle) throws HiveSQLException { - return cliService.getTableTypes(sessionHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getColumns(org.apache.hive.service.cli.SessionHandle, java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - @Override - public OperationHandle getColumns(SessionHandle sessionHandle, String catalogName, - String schemaName, String tableName, String columnName) throws HiveSQLException { - return cliService.getColumns(sessionHandle, catalogName, schemaName, tableName, columnName); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getFunctions(org.apache.hive.service.cli.SessionHandle, java.lang.String) - */ - @Override - public OperationHandle getFunctions(SessionHandle sessionHandle, - String catalogName, String schemaName, String functionName) - throws HiveSQLException { - return cliService.getFunctions(sessionHandle, catalogName, schemaName, functionName); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getOperationStatus(org.apache.hive.service.cli.OperationHandle) - */ - @Override - public OperationStatus getOperationStatus(OperationHandle opHandle) throws HiveSQLException { - return cliService.getOperationStatus(opHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#cancelOperation(org.apache.hive.service.cli.OperationHandle) - */ - @Override - public void cancelOperation(OperationHandle opHandle) throws HiveSQLException { - cliService.cancelOperation(opHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#closeOperation(org.apache.hive.service.cli.OperationHandle) - */ - @Override - public void closeOperation(OperationHandle opHandle) throws HiveSQLException { - cliService.closeOperation(opHandle); - } - - /* (non-Javadoc) - * @see org.apache.hive.service.cli.CLIServiceClient#getResultSetMetadata(org.apache.hive.service.cli.OperationHandle) - */ - @Override - public TableSchema getResultSetMetadata(OperationHandle opHandle) throws HiveSQLException { - return cliService.getResultSetMetadata(opHandle); - } - - @Override - public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, - long maxRows, FetchType fetchType) throws HiveSQLException { - return cliService.fetchResults(opHandle, orientation, maxRows, fetchType); - } - - - @Override - public String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, - String owner, String renewer) throws HiveSQLException { - return cliService.getDelegationToken(sessionHandle, authFactory, owner, renewer); - } - - @Override - public void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, - String tokenStr) throws HiveSQLException { - cliService.cancelDelegationToken(sessionHandle, authFactory, tokenStr); - } - - @Override - public void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, - String tokenStr) throws HiveSQLException { - cliService.renewDelegationToken(sessionHandle, authFactory, tokenStr); - } -} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/FetchOrientation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/FetchOrientation.java index ffa6f2e1f3743..ced49c9d29764 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/FetchOrientation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/FetchOrientation.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TFetchOrientation; +import org.apache.hive.service.rpc.thrift.TFetchOrientation; /** * FetchOrientation. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoType.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoType.java index 8dd33a88fdeb2..a64d262a8f301 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoType.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoType.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TGetInfoType; +import org.apache.hive.service.rpc.thrift.TGetInfoType; /** * GetInfoType. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoValue.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoValue.java index ba92ff4ab5c11..2b2359cc13c0f 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoValue.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/GetInfoValue.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TGetInfoValue; +import org.apache.hive.service.rpc.thrift.TGetInfoValue; /** * GetInfoValue. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Handle.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Handle.java index cf3427ae20f3c..64b8bb16387dd 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Handle.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Handle.java @@ -17,7 +17,7 @@ */ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.THandleIdentifier; +import org.apache.hive.service.rpc.thrift.THandleIdentifier; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java index 4dc80da8dc500..b0fae20e6e0e1 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HandleIdentifier.java @@ -21,7 +21,7 @@ import java.nio.ByteBuffer; import java.util.UUID; -import org.apache.hive.service.cli.thrift.THandleIdentifier; +import org.apache.hive.service.rpc.thrift.THandleIdentifier; /** * HandleIdentifier. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HiveSQLException.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HiveSQLException.java index 86e57fbf31fe0..c331d5492b04e 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HiveSQLException.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HiveSQLException.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import java.util.List; -import org.apache.hive.service.cli.thrift.TStatus; -import org.apache.hive.service.cli.thrift.TStatusCode; +import org.apache.hive.service.rpc.thrift.TStatus; +import org.apache.hive.service.rpc.thrift.TStatusCode; /** * HiveSQLException. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ICLIService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ICLIService.java index c9cc1f4da56f1..3200909477821 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ICLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ICLIService.java @@ -42,12 +42,15 @@ GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) throws HiveSQLException; OperationHandle executeStatement(SessionHandle sessionHandle, String statement, - Map confOverlay) - throws HiveSQLException; + Map confOverlay) throws HiveSQLException; - OperationHandle executeStatementAsync(SessionHandle sessionHandle, - String statement, Map confOverlay) - throws HiveSQLException; + OperationHandle executeStatement(SessionHandle sessionHandle, String statement, + Map confOverlay, long queryTimeout) throws HiveSQLException; + + OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, + Map confOverlay) throws HiveSQLException; + OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, + Map confOverlay, long queryTimeout) throws HiveSQLException; OperationHandle getTypeInfo(SessionHandle sessionHandle) throws HiveSQLException; @@ -101,5 +104,10 @@ void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFact void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException; + OperationHandle getPrimaryKeys(SessionHandle sessionHandle, String catalog, + String schema, String table) throws HiveSQLException; + OperationHandle getCrossReference(SessionHandle sessionHandle, + String primaryCatalog, String primarySchema, String primaryTable, + String foreignCatalog, String foreignSchema, String foreignTable) throws HiveSQLException; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationHandle.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationHandle.java index 5426e28471239..267a6f84872b6 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationHandle.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationHandle.java @@ -17,8 +17,8 @@ */ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TOperationHandle; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TOperationHandle; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; public class OperationHandle extends Handle { diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationState.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationState.java index 1165180118413..58e30aceeb54f 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationState.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationState.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TOperationState; +import org.apache.hive.service.rpc.thrift.TOperationState; /** * OperationState. @@ -32,7 +32,8 @@ public enum OperationState { CLOSED(TOperationState.CLOSED_STATE, true), ERROR(TOperationState.ERROR_STATE, true), UNKNOWN(TOperationState.UKNOWN_STATE, false), - PENDING(TOperationState.PENDING_STATE, false); + PENDING(TOperationState.PENDING_STATE, false), + TIMEDOUT(TOperationState.TIMEDOUT_STATE, true); private final TOperationState tOperationState; private final boolean terminal; @@ -57,6 +58,7 @@ public static void validateTransition(OperationState oldState, case RUNNING: case CANCELED: case CLOSED: + case TIMEDOUT: return; } break; @@ -67,6 +69,7 @@ public static void validateTransition(OperationState oldState, case CANCELED: case ERROR: case CLOSED: + case TIMEDOUT: return; } break; @@ -76,11 +79,13 @@ public static void validateTransition(OperationState oldState, case CANCELED: case ERROR: case CLOSED: + case TIMEDOUT: return; } break; case FINISHED: case CANCELED: + case TIMEDOUT: case ERROR: if (OperationState.CLOSED.equals(newState)) { return; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationType.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationType.java index 429d9a4c25688..e712ef0f71044 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationType.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/OperationType.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TOperationType; +import org.apache.hive.service.rpc.thrift.TOperationType; /** * OperationType. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowBasedSet.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowBasedSet.java index 7452137f077db..14dcd11bccd13 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowBasedSet.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowBasedSet.java @@ -22,9 +22,9 @@ import java.util.Iterator; import java.util.List; -import org.apache.hive.service.cli.thrift.TColumnValue; -import org.apache.hive.service.cli.thrift.TRow; -import org.apache.hive.service.cli.thrift.TRowSet; +import org.apache.hive.service.rpc.thrift.TColumnValue; +import org.apache.hive.service.rpc.thrift.TRow; +import org.apache.hive.service.rpc.thrift.TRowSet; /** * RowBasedSet @@ -33,22 +33,22 @@ public class RowBasedSet implements RowSet { private long startOffset; - private final Type[] types; // non-null only for writing (server-side) + private final TypeDescriptor[] descriptors; // non-null only for writing (server-side) private final RemovableList rows; public RowBasedSet(TableSchema schema) { - types = schema.toTypes(); + descriptors = schema.toTypeDescriptors(); rows = new RemovableList(); } public RowBasedSet(TRowSet tRowSet) { - types = null; + descriptors = null; rows = new RemovableList(tRowSet.getRows()); startOffset = tRowSet.getStartRowOffset(); } - private RowBasedSet(Type[] types, List rows, long startOffset) { - this.types = types; + private RowBasedSet(TypeDescriptor[] descriptors, List rows, long startOffset) { + this.descriptors = descriptors; this.rows = new RemovableList(rows); this.startOffset = startOffset; } @@ -57,7 +57,7 @@ private RowBasedSet(Type[] types, List rows, long startOffset) { public RowBasedSet addRow(Object[] fields) { TRow tRow = new TRow(); for (int i = 0; i < fields.length; i++) { - tRow.addToColVals(ColumnValue.toTColumnValue(types[i], fields[i])); + tRow.addToColVals(ColumnValue.toTColumnValue(descriptors[i], fields[i])); } rows.add(tRow); return this; @@ -75,7 +75,7 @@ public int numRows() { public RowBasedSet extractSubset(int maxRows) { int numRows = Math.min(numRows(), maxRows); - RowBasedSet result = new RowBasedSet(types, rows.subList(0, numRows), startOffset); + RowBasedSet result = new RowBasedSet(descriptors, rows.subList(0, numRows), startOffset); rows.removeRange(0, numRows); startOffset += numRows; return result; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSet.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSet.java index ab0787e1d389e..60d79dcadc37b 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSet.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSet.java @@ -18,7 +18,7 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TRowSet; +import org.apache.hive.service.rpc.thrift.TRowSet; public interface RowSet extends Iterable { diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSetFactory.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSetFactory.java index e8f68eaaf9063..5ed2889e65346 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSetFactory.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/RowSetFactory.java @@ -18,21 +18,22 @@ package org.apache.hive.service.cli; -import org.apache.hive.service.cli.thrift.TProtocolVersion; -import org.apache.hive.service.cli.thrift.TRowSet; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TRowSet; +import org.apache.thrift.TException; -import static org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6; +import static org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6; public class RowSetFactory { - public static RowSet create(TableSchema schema, TProtocolVersion version) { + public static RowSet create(TableSchema schema, TProtocolVersion version, boolean isBlobBased) { if (version.getValue() >= HIVE_CLI_SERVICE_PROTOCOL_V6.getValue()) { - return new ColumnBasedSet(schema); + return new ColumnBasedSet(schema, isBlobBased); } return new RowBasedSet(schema); } - public static RowSet create(TRowSet results, TProtocolVersion version) { + public static RowSet create(TRowSet results, TProtocolVersion version) throws TException { if (version.getValue() >= HIVE_CLI_SERVICE_PROTOCOL_V6.getValue()) { return new ColumnBasedSet(results); } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/SessionHandle.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/SessionHandle.java index 52e0ad4834d8b..5b21242addeb8 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/SessionHandle.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/SessionHandle.java @@ -20,8 +20,8 @@ import java.util.UUID; -import org.apache.hive.service.cli.thrift.TProtocolVersion; -import org.apache.hive.service.cli.thrift.TSessionHandle; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TSessionHandle; /** @@ -46,6 +46,11 @@ public SessionHandle(TSessionHandle tSessionHandle, TProtocolVersion protocol) { this.protocol = protocol; } + public SessionHandle(HandleIdentifier handleId, TProtocolVersion protocol) { + super(handleId); + this.protocol = protocol; + } + public UUID getSessionId() { return getHandleIdentifier().getPublicId(); } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TableSchema.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TableSchema.java index ee019bc737101..8d6f9f3ddf9ec 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TableSchema.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TableSchema.java @@ -23,8 +23,9 @@ import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; -import org.apache.hive.service.cli.thrift.TColumnDesc; -import org.apache.hive.service.cli.thrift.TTableSchema; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.rpc.thrift.TColumnDesc; +import org.apache.hive.service.rpc.thrift.TTableSchema; /** * TableSchema. @@ -49,7 +50,8 @@ public TableSchema(TTableSchema tTableSchema) { public TableSchema(List fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { - columns.add(new ColumnDescriptor(field, pos++)); + columns.add(new ColumnDescriptor(field.getName(), field.getComment(), + new TypeDescriptor(field.getType()), pos++)); } } @@ -82,10 +84,10 @@ public TTableSchema toTTableSchema() { return tTableSchema; } - public Type[] toTypes() { - Type[] types = new Type[columns.size()]; + public TypeDescriptor[] toTypeDescriptors() { + TypeDescriptor[] types = new TypeDescriptor[columns.size()]; for (int i = 0; i < types.length; i++) { - types[i] = columns.get(i).getType(); + types[i] = columns.get(i).getTypeDescriptor(); } return types; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Type.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Type.java deleted file mode 100644 index 7752ec03a29b7..0000000000000 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/Type.java +++ /dev/null @@ -1,349 +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. - */ - -package org.apache.hive.service.cli; - -import java.sql.DatabaseMetaData; -import java.util.Locale; - -import org.apache.hadoop.hive.common.type.HiveDecimal; -import org.apache.hive.service.cli.thrift.TTypeId; - -/** - * Type. - * - */ -public enum Type { - NULL_TYPE("VOID", - java.sql.Types.NULL, - TTypeId.NULL_TYPE), - BOOLEAN_TYPE("BOOLEAN", - java.sql.Types.BOOLEAN, - TTypeId.BOOLEAN_TYPE), - TINYINT_TYPE("TINYINT", - java.sql.Types.TINYINT, - TTypeId.TINYINT_TYPE), - SMALLINT_TYPE("SMALLINT", - java.sql.Types.SMALLINT, - TTypeId.SMALLINT_TYPE), - INT_TYPE("INT", - java.sql.Types.INTEGER, - TTypeId.INT_TYPE), - BIGINT_TYPE("BIGINT", - java.sql.Types.BIGINT, - TTypeId.BIGINT_TYPE), - FLOAT_TYPE("FLOAT", - java.sql.Types.FLOAT, - TTypeId.FLOAT_TYPE), - DOUBLE_TYPE("DOUBLE", - java.sql.Types.DOUBLE, - TTypeId.DOUBLE_TYPE), - STRING_TYPE("STRING", - java.sql.Types.VARCHAR, - TTypeId.STRING_TYPE), - CHAR_TYPE("CHAR", - java.sql.Types.CHAR, - TTypeId.CHAR_TYPE, - true, false, false), - VARCHAR_TYPE("VARCHAR", - java.sql.Types.VARCHAR, - TTypeId.VARCHAR_TYPE, - true, false, false), - DATE_TYPE("DATE", - java.sql.Types.DATE, - TTypeId.DATE_TYPE), - TIMESTAMP_TYPE("TIMESTAMP", - java.sql.Types.TIMESTAMP, - TTypeId.TIMESTAMP_TYPE), - INTERVAL_YEAR_MONTH_TYPE("INTERVAL_YEAR_MONTH", - java.sql.Types.OTHER, - TTypeId.INTERVAL_YEAR_MONTH_TYPE), - INTERVAL_DAY_TIME_TYPE("INTERVAL_DAY_TIME", - java.sql.Types.OTHER, - TTypeId.INTERVAL_DAY_TIME_TYPE), - BINARY_TYPE("BINARY", - java.sql.Types.BINARY, - TTypeId.BINARY_TYPE), - DECIMAL_TYPE("DECIMAL", - java.sql.Types.DECIMAL, - TTypeId.DECIMAL_TYPE, - true, false, false), - ARRAY_TYPE("ARRAY", - java.sql.Types.ARRAY, - TTypeId.ARRAY_TYPE, - true, true), - MAP_TYPE("MAP", - java.sql.Types.JAVA_OBJECT, - TTypeId.MAP_TYPE, - true, true), - STRUCT_TYPE("STRUCT", - java.sql.Types.STRUCT, - TTypeId.STRUCT_TYPE, - true, false), - UNION_TYPE("UNIONTYPE", - java.sql.Types.OTHER, - TTypeId.UNION_TYPE, - true, false), - USER_DEFINED_TYPE("USER_DEFINED", - java.sql.Types.OTHER, - TTypeId.USER_DEFINED_TYPE, - true, false); - - private final String name; - private final TTypeId tType; - private final int javaSQLType; - private final boolean isQualified; - private final boolean isComplex; - private final boolean isCollection; - - Type(String name, int javaSQLType, TTypeId tType, boolean isQualified, boolean isComplex, boolean isCollection) { - this.name = name; - this.javaSQLType = javaSQLType; - this.tType = tType; - this.isQualified = isQualified; - this.isComplex = isComplex; - this.isCollection = isCollection; - } - - Type(String name, int javaSQLType, TTypeId tType, boolean isComplex, boolean isCollection) { - this(name, javaSQLType, tType, false, isComplex, isCollection); - } - - Type(String name, int javaSqlType, TTypeId tType) { - this(name, javaSqlType, tType, false, false, false); - } - - public boolean isPrimitiveType() { - return !isComplex; - } - - public boolean isQualifiedType() { - return isQualified; - } - - public boolean isComplexType() { - return isComplex; - } - - public boolean isCollectionType() { - return isCollection; - } - - public static Type getType(TTypeId tType) { - for (Type type : values()) { - if (tType.equals(type.tType)) { - return type; - } - } - throw new IllegalArgumentException("Unregonized Thrift TTypeId value: " + tType); - } - - public static Type getType(String name) { - if (name == null) { - throw new IllegalArgumentException("Invalid type name: null"); - } - for (Type type : values()) { - if (name.equalsIgnoreCase(type.name)) { - return type; - } else if (type.isQualifiedType() || type.isComplexType()) { - if (name.toUpperCase(Locale.ROOT).startsWith(type.name)) { - return type; - } - } - } - throw new IllegalArgumentException("Unrecognized type name: " + name); - } - - /** - * Radix for this type (typically either 2 or 10) - * Null is returned for data types where this is not applicable. - */ - public Integer getNumPrecRadix() { - if (this.isNumericType()) { - return 10; - } - return null; - } - - /** - * Maximum precision for numeric types. - * Returns null for non-numeric types. - * @return - */ - public Integer getMaxPrecision() { - switch (this) { - case TINYINT_TYPE: - return 3; - case SMALLINT_TYPE: - return 5; - case INT_TYPE: - return 10; - case BIGINT_TYPE: - return 19; - case FLOAT_TYPE: - return 7; - case DOUBLE_TYPE: - return 15; - case DECIMAL_TYPE: - return HiveDecimal.MAX_PRECISION; - default: - return null; - } - } - - public boolean isNumericType() { - switch (this) { - case TINYINT_TYPE: - case SMALLINT_TYPE: - case INT_TYPE: - case BIGINT_TYPE: - case FLOAT_TYPE: - case DOUBLE_TYPE: - case DECIMAL_TYPE: - return true; - default: - return false; - } - } - - /** - * Prefix used to quote a literal of this type (may be null) - */ - public String getLiteralPrefix() { - return null; - } - - /** - * Suffix used to quote a literal of this type (may be null) - * @return - */ - public String getLiteralSuffix() { - return null; - } - - /** - * Can you use NULL for this type? - * @return - * DatabaseMetaData.typeNoNulls - does not allow NULL values - * DatabaseMetaData.typeNullable - allows NULL values - * DatabaseMetaData.typeNullableUnknown - nullability unknown - */ - public Short getNullable() { - // All Hive types are nullable - return DatabaseMetaData.typeNullable; - } - - /** - * Is the type case sensitive? - * @return - */ - public Boolean isCaseSensitive() { - switch (this) { - case STRING_TYPE: - return true; - default: - return false; - } - } - - /** - * Parameters used in creating the type (may be null) - * @return - */ - public String getCreateParams() { - return null; - } - - /** - * Can you use WHERE based on this type? - * @return - * DatabaseMetaData.typePredNone - No support - * DatabaseMetaData.typePredChar - Only support with WHERE .. LIKE - * DatabaseMetaData.typePredBasic - Supported except for WHERE .. LIKE - * DatabaseMetaData.typeSearchable - Supported for all WHERE .. - */ - public Short getSearchable() { - if (isPrimitiveType()) { - return DatabaseMetaData.typeSearchable; - } - return DatabaseMetaData.typePredNone; - } - - /** - * Is this type unsigned? - * @return - */ - public Boolean isUnsignedAttribute() { - if (isNumericType()) { - return false; - } - return true; - } - - /** - * Can this type represent money? - * @return - */ - public Boolean isFixedPrecScale() { - return false; - } - - /** - * Can this type be used for an auto-increment value? - * @return - */ - public Boolean isAutoIncrement() { - return false; - } - - /** - * Localized version of type name (may be null). - * @return - */ - public String getLocalizedName() { - return null; - } - - /** - * Minimum scale supported for this type - * @return - */ - public Short getMinimumScale() { - return 0; - } - - /** - * Maximum scale supported for this type - * @return - */ - public Short getMaximumScale() { - return 0; - } - - public TTypeId toTType() { - return tType; - } - - public int toJavaSQLType() { - return javaSQLType; - } - - public String getName() { - return name; - } -} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java index b80fd67884add..135c957f87849 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeDescriptor.java @@ -20,11 +20,12 @@ import java.util.List; +import org.apache.hadoop.hive.serde2.thrift.Type; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; -import org.apache.hive.service.cli.thrift.TPrimitiveTypeEntry; -import org.apache.hive.service.cli.thrift.TTypeDesc; -import org.apache.hive.service.cli.thrift.TTypeEntry; +import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry; +import org.apache.hive.service.rpc.thrift.TTypeDesc; +import org.apache.hive.service.rpc.thrift.TTypeEntry; /** * TypeDescriptor. diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java index c6da52c15a2b5..bf3c01c2ab001 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/TypeQualifiers.java @@ -25,9 +25,9 @@ import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.VarcharTypeInfo; -import org.apache.hive.service.cli.thrift.TCLIServiceConstants; -import org.apache.hive.service.cli.thrift.TTypeQualifierValue; -import org.apache.hive.service.cli.thrift.TTypeQualifiers; +import org.apache.hive.service.rpc.thrift.TCLIServiceConstants; +import org.apache.hive.service.rpc.thrift.TTypeQualifierValue; +import org.apache.hive.service.rpc.thrift.TTypeQualifiers; /** * This class holds type qualifier information for a primitive type, diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java index af36057bdaeca..50091f0230e64 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ClassicTableTypeMapping.java @@ -18,12 +18,19 @@ package org.apache.hive.service.cli.operation; +import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Iterables; +import com.google.common.collect.Multimap; import org.apache.hadoop.hive.metastore.TableType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ClassicTableTypeMapping. @@ -34,51 +41,56 @@ */ public class ClassicTableTypeMapping implements TableTypeMapping { + private static final Logger LOG = LoggerFactory.getLogger(ClassicTableTypeMapping.class); + public enum ClassicTableTypes { TABLE, VIEW, + MATERIALIZED_VIEW, } private final Map hiveToClientMap = new HashMap(); - private final Map clientToHiveMap = new HashMap(); + private final Multimap clientToHiveMap = ArrayListMultimap.create(); public ClassicTableTypeMapping() { - hiveToClientMap.put(TableType.MANAGED_TABLE.toString(), - ClassicTableTypes.TABLE.toString()); - hiveToClientMap.put(TableType.EXTERNAL_TABLE.toString(), - ClassicTableTypes.TABLE.toString()); - hiveToClientMap.put(TableType.VIRTUAL_VIEW.toString(), - ClassicTableTypes.VIEW.toString()); + hiveToClientMap.put(TableType.MANAGED_TABLE.name(), ClassicTableTypes.TABLE.name()); + hiveToClientMap.put(TableType.EXTERNAL_TABLE.name(), ClassicTableTypes.TABLE.name()); + hiveToClientMap.put(TableType.VIRTUAL_VIEW.name(), ClassicTableTypes.VIEW.name()); + hiveToClientMap.put(TableType.MATERIALIZED_VIEW.toString(), + ClassicTableTypes.MATERIALIZED_VIEW.toString()); - clientToHiveMap.put(ClassicTableTypes.TABLE.toString(), - TableType.MANAGED_TABLE.toString()); - clientToHiveMap.put(ClassicTableTypes.VIEW.toString(), - TableType.VIRTUAL_VIEW.toString()); + clientToHiveMap.putAll(ClassicTableTypes.TABLE.name(), Arrays.asList( + TableType.MANAGED_TABLE.name(), TableType.EXTERNAL_TABLE.name())); + clientToHiveMap.put(ClassicTableTypes.VIEW.name(), TableType.VIRTUAL_VIEW.name()); + clientToHiveMap.put(ClassicTableTypes.MATERIALIZED_VIEW.toString(), + TableType.MATERIALIZED_VIEW.toString()); } @Override - public String mapToHiveType(String clientTypeName) { - if (clientToHiveMap.containsKey(clientTypeName)) { - return clientToHiveMap.get(clientTypeName); - } else { - return clientTypeName; + public String[] mapToHiveType(String clientTypeName) { + Collection hiveTableType = clientToHiveMap.get(clientTypeName.toUpperCase()); + if (hiveTableType == null) { + LOG.warn("Not supported client table type " + clientTypeName); + return new String[] {clientTypeName}; } + return Iterables.toArray(hiveTableType, String.class); } @Override public String mapToClientType(String hiveTypeName) { - if (hiveToClientMap.containsKey(hiveTypeName)) { - return hiveToClientMap.get(hiveTypeName); - } else { + String clientTypeName = hiveToClientMap.get(hiveTypeName); + if (clientTypeName == null) { + LOG.warn("Invalid hive table type " + hiveTypeName); return hiveTypeName; } + return clientTypeName; } @Override public Set getTableTypeNames() { Set typeNameSet = new HashSet(); for (ClassicTableTypes typeNames : ClassicTableTypes.values()) { - typeNameSet.add(typeNames.toString()); + typeNameSet.add(typeNames.name()); } return typeNameSet; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java index 6740d3bb59dc3..5b1e21dafe937 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/ExecuteStatementOperation.java @@ -18,7 +18,6 @@ package org.apache.hive.service.cli.operation; import java.sql.SQLException; -import java.util.HashMap; import java.util.Map; import org.apache.hadoop.hive.ql.processors.CommandProcessor; @@ -30,22 +29,20 @@ public abstract class ExecuteStatementOperation extends Operation { protected String statement = null; - protected Map confOverlay = new HashMap(); public ExecuteStatementOperation(HiveSession parentSession, String statement, Map confOverlay, boolean runInBackground) { - super(parentSession, OperationType.EXECUTE_STATEMENT, runInBackground); + super(parentSession, confOverlay, OperationType.EXECUTE_STATEMENT, runInBackground); this.statement = statement; - setConfOverlay(confOverlay); } public String getStatement() { return statement; } - public static ExecuteStatementOperation newExecuteStatementOperation( - HiveSession parentSession, String statement, Map confOverlay, boolean runAsync) - throws HiveSQLException { + public static ExecuteStatementOperation newExecuteStatementOperation(HiveSession parentSession, + String statement, Map confOverlay, boolean runAsync, long queryTimeout) + throws HiveSQLException { String[] tokens = statement.trim().split("\\s+"); CommandProcessor processor = null; try { @@ -54,21 +51,12 @@ public static ExecuteStatementOperation newExecuteStatementOperation( throw new HiveSQLException(e.getMessage(), e.getSQLState(), e); } if (processor == null) { - return new SQLOperation(parentSession, statement, confOverlay, runAsync); + // runAsync, queryTimeout makes sense only for a SQLOperation + return new SQLOperation(parentSession, statement, confOverlay, runAsync, queryTimeout); } return new HiveCommandOperation(parentSession, statement, processor, confOverlay); } - protected Map getConfOverlay() { - return confOverlay; - } - - protected void setConfOverlay(Map confOverlay) { - if (confOverlay != null) { - this.confOverlay = confOverlay; - } - } - protected void registerCurrentOperationLog() { if (isOperationLogEnabled) { if (operationLog == null) { diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java index 8868ec18e0f50..b85d5c03fedba 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCatalogsOperation.java @@ -40,7 +40,7 @@ public class GetCatalogsOperation extends MetadataOperation { protected GetCatalogsOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_CATALOGS); - rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java index 5efb0759383ac..7dcaf022f18dc 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java @@ -22,16 +22,24 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.regex.Pattern; +import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.metastore.IMetaStoreClient; +import org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest; +import org.apache.hadoop.hive.metastore.api.SQLPrimaryKey; import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.ql.metadata.TableIterable; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveOperationType; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObject; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObject.HivePrivilegeObjectType; +import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hadoop.hive.serde2.thrift.Type; import org.apache.hive.service.cli.ColumnDescriptor; import org.apache.hive.service.cli.FetchOrientation; import org.apache.hive.service.cli.HiveSQLException; @@ -40,7 +48,6 @@ import org.apache.hive.service.cli.RowSet; import org.apache.hive.service.cli.RowSetFactory; import org.apache.hive.service.cli.TableSchema; -import org.apache.hive.service.cli.Type; import org.apache.hive.service.cli.session.HiveSession; /** @@ -118,7 +125,7 @@ protected GetColumnsOperation(HiveSession parentSession, String catalogName, Str this.schemaName = schemaName; this.tableName = tableName; this.columnName = columnName; - this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override @@ -151,11 +158,20 @@ public void runInternal() throws HiveSQLException { authorizeMetaGets(HiveOperationType.GET_COLUMNS, privObjs, cmdStr); } + int maxBatchSize = SessionState.get().getConf().getIntVar(ConfVars.METASTORE_BATCH_RETRIEVE_MAX); for (Entry> dbTabs : db2Tabs.entrySet()) { String dbName = dbTabs.getKey(); List tableNames = dbTabs.getValue(); - for (Table table : metastoreClient.getTableObjectsByName(dbName, tableNames)) { - TableSchema schema = new TableSchema(metastoreClient.getSchema(dbName, table.getTableName())); + + for (Table table : new TableIterable(metastoreClient, dbName, tableNames, maxBatchSize)) { + + TableSchema schema = new TableSchema(metastoreClient.getSchema(dbName, + table.getTableName())); + List primaryKeys = metastoreClient.getPrimaryKeys(new PrimaryKeysRequest(dbName, table.getTableName())); + Set pkColNames = new HashSet<>(); + for(SQLPrimaryKey key : primaryKeys) { + pkColNames.add(key.getColumn_name().toLowerCase()); + } for (ColumnDescriptor column : schema.getColumnDescriptors()) { if (columnPattern != null && !columnPattern.matcher(column.getName()).matches()) { continue; @@ -171,14 +187,15 @@ public void runInternal() throws HiveSQLException { null, // BUFFER_LENGTH, unused column.getTypeDescriptor().getDecimalDigits(), // DECIMAL_DIGITS column.getType().getNumPrecRadix(), // NUM_PREC_RADIX - DatabaseMetaData.columnNullable, // NULLABLE + pkColNames.contains(column.getName().toLowerCase()) ? DatabaseMetaData.columnNoNulls + : DatabaseMetaData.columnNullable, // NULLABLE column.getComment(), // REMARKS null, // COLUMN_DEF null, // SQL_DATA_TYPE null, // SQL_DATETIME_SUB null, // CHAR_OCTET_LENGTH column.getOrdinalPosition(), // ORDINAL_POSITION - "YES", // IS_NULLABLE + pkColNames.contains(column.getName().toLowerCase()) ? "NO" : "YES", // IS_NULLABLE null, // SCOPE_CATALOG null, // SCOPE_SCHEMA null, // SCOPE_TABLE diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java new file mode 100644 index 0000000000000..2dc338127572e --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetCrossReferenceOperation.java @@ -0,0 +1,161 @@ +/** + * 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. + */ + +package org.apache.hive.service.cli.operation; + +import org.apache.hadoop.hive.metastore.IMetaStoreClient; +import org.apache.hadoop.hive.metastore.api.ForeignKeysRequest; +import org.apache.hadoop.hive.metastore.api.SQLForeignKey; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.cli.*; +import org.apache.hive.service.cli.session.HiveSession; + +import java.util.List; + +/** + * GetCrossReferenceOperation. + * + */ +public class GetCrossReferenceOperation extends MetadataOperation { + /** + PKTABLE_CAT String => parent key table catalog (may be null) + PKTABLE_SCHEM String => parent key table schema (may be null) + PKTABLE_NAME String => parent key table name + PKCOLUMN_NAME String => parent key column name + FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null) + FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null) + FKTABLE_NAME String => foreign key table name being exported + FKCOLUMN_NAME String => foreign key column name being exported + KEY_SEQ short => sequence number within foreign key( a value of 1 represents the first column of the foreign key, a value of 2 would represent the second column within the foreign key). + UPDATE_RULE short => What happens to foreign key when parent key is updated: + importedNoAction - do not allow update of parent key if it has been imported + importedKeyCascade - change imported key to agree with parent key update + importedKeySetNull - change imported key to NULL if its parent key has been updated + importedKeySetDefault - change imported key to default values if its parent key has been updated + importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility) + DELETE_RULE short => What happens to the foreign key when parent key is deleted. + importedKeyNoAction - do not allow delete of parent key if it has been imported + importedKeyCascade - delete rows that import a deleted key + importedKeySetNull - change imported key to NULL if its primary key has been deleted + importedKeyRestrict - same as importedKeyNoAction (for ODBC 2.x compatibility) + importedKeySetDefault - change imported key to default if its parent key has been deleted + FK_NAME String => foreign key name (may be null) + PK_NAME String => parent key name (may be null) + DEFERRABILITY short => can the evaluation of foreign key constraints be deferred until commit + importedKeyInitiallyDeferred - see SQL92 for definition + importedKeyInitiallyImmediate - see SQL92 for definition + importedKeyNotDeferrable - see SQL92 for definition + */ + private static final TableSchema RESULT_SET_SCHEMA = new TableSchema() + .addPrimitiveColumn("PKTABLE_CAT", Type.STRING_TYPE, + "Parent key table catalog (may be null)") + .addPrimitiveColumn("PKTABLE_SCHEM", Type.STRING_TYPE, + "Parent key table schema (may be null)") + .addPrimitiveColumn("PKTABLE_NAME", Type.STRING_TYPE, + "Parent Key table name") + .addPrimitiveColumn("PKCOLUMN_NAME", Type.STRING_TYPE, + "Parent Key column name") + .addPrimitiveColumn("FKTABLE_CAT", Type.STRING_TYPE, + "Foreign key table catalog (may be null)") + .addPrimitiveColumn("FKTABLE_SCHEM", Type.STRING_TYPE, + "Foreign key table schema (may be null)") + .addPrimitiveColumn("FKTABLE_NAME", Type.STRING_TYPE, + "Foreign Key table name") + .addPrimitiveColumn("FKCOLUMN_NAME", Type.STRING_TYPE, + "Foreign Key column name") + .addPrimitiveColumn("KEQ_SEQ", Type.INT_TYPE, + "Sequence number within primary key") + .addPrimitiveColumn("UPDATE_RULE", Type.INT_TYPE, + "What happens to foreign key when parent key is updated") + .addPrimitiveColumn("DELETE_RULE", Type.INT_TYPE, + "What happens to foreign key when parent key is deleted") + .addPrimitiveColumn("FK_NAME", Type.STRING_TYPE, + "Foreign key name (may be null)") + .addPrimitiveColumn("PK_NAME", Type.STRING_TYPE, + "Primary key name (may be null)") + .addPrimitiveColumn("DEFERRABILITY", Type.INT_TYPE, + "Can the evaluation of foreign key constraints be deferred until commit"); + private final String parentCatalogName; + private final String parentSchemaName; + private final String parentTableName; + private final String foreignCatalogName; + private final String foreignSchemaName; + private final String foreignTableName; + private final RowSet rowSet; + + public GetCrossReferenceOperation(HiveSession parentSession, + String parentCatalogName, String parentSchemaName, String parentTableName, + String foreignCatalog, String foreignSchema, String foreignTable) { + super(parentSession, OperationType.GET_FUNCTIONS); + this.parentCatalogName = parentCatalogName; + this.parentSchemaName = parentSchemaName; + this.parentTableName = parentTableName; + this.foreignCatalogName = foreignCatalog; + this.foreignSchemaName = foreignSchema; + this.foreignTableName = foreignTable; + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); + } + + @Override + public void runInternal() throws HiveSQLException { + setState(OperationState.RUNNING); + try { + IMetaStoreClient metastoreClient = getParentSession().getMetaStoreClient(); + ForeignKeysRequest fkReq = new ForeignKeysRequest(parentSchemaName, parentTableName, foreignSchemaName, foreignTableName); + List fks = metastoreClient.getForeignKeys(fkReq); + if (fks == null) { + return; + } + for (SQLForeignKey fk : fks) { + rowSet.addRow(new Object[] {parentCatalogName, + fk.getPktable_db(), fk.getPktable_name(), fk.getPkcolumn_name(), + foreignCatalogName, + fk.getFktable_db(), fk.getFktable_name(), fk.getFkcolumn_name(), + fk.getKey_seq(), fk.getUpdate_rule(), fk.getDelete_rule(), fk.getFk_name(), + fk.getPk_name(), 0}); + } + setState(OperationState.FINISHED); + } catch (Exception e) { + setState(OperationState.ERROR); + throw new HiveSQLException(e); + } + } + + + /* (non-Javadoc) + * @see org.apache.hive.service.cli.Operation#getResultSetSchema() + */ + @Override + public TableSchema getResultSetSchema() throws HiveSQLException { + assertState(OperationState.FINISHED); + return RESULT_SET_SCHEMA; + } + + /* (non-Javadoc) + * @see org.apache.hive.service.cli.Operation#getNextRowSet(org.apache.hive.service.cli.FetchOrientation, long) + */ + @Override + public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { + assertState(OperationState.FINISHED); + validateDefaultFetchOrientation(orientation); + if (orientation.equals(FetchOrientation.FETCH_FIRST)) { + rowSet.setStartOffset(0); + } + return rowSet.extractSubset((int)maxRows); + } +} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java index 5273c386b83d4..6aa0c41458b53 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetFunctionsOperation.java @@ -28,6 +28,7 @@ import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveOperationType; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObject; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObjectUtils; +import org.apache.hadoop.hive.serde2.thrift.Type; import org.apache.hive.service.cli.CLIServiceUtils; import org.apache.hive.service.cli.FetchOrientation; import org.apache.hive.service.cli.HiveSQLException; @@ -36,7 +37,6 @@ import org.apache.hive.service.cli.RowSet; import org.apache.hive.service.cli.RowSetFactory; import org.apache.hive.service.cli.TableSchema; -import org.apache.hive.service.cli.Type; import org.apache.hive.service.cli.session.HiveSession; import org.apache.thrift.TException; @@ -71,7 +71,7 @@ public GetFunctionsOperation(HiveSession parentSession, this.catalogName = catalogName; this.schemaName = schemaName; this.functionName = functionName; - this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java new file mode 100644 index 0000000000000..7da6a1a19b6cc --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetPrimaryKeysOperation.java @@ -0,0 +1,115 @@ +/** + * 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. + */ + +package org.apache.hive.service.cli.operation; + +import org.apache.hadoop.hive.metastore.IMetaStoreClient; +import org.apache.hadoop.hive.metastore.api.PrimaryKeysRequest; +import org.apache.hadoop.hive.metastore.api.SQLPrimaryKey; +import org.apache.hadoop.hive.serde2.thrift.Type; +import org.apache.hive.service.cli.*; +import org.apache.hive.service.cli.session.HiveSession; + +import java.util.List; + +/** + * GetPrimaryKeysOperation. + * + */ +public class GetPrimaryKeysOperation extends MetadataOperation { + /** + TABLE_CAT String => table catalog (may be null) + TABLE_SCHEM String => table schema (may be null) + TABLE_NAME String => table name + COLUMN_NAME String => column name + KEY_SEQ short => sequence number within primary key( a value of 1 represents the first column of the primary key, a value of 2 would represent the second column within the primary key). + PK_NAME String => primary key name (may be null) + */ + private static final TableSchema RESULT_SET_SCHEMA = new TableSchema() + .addPrimitiveColumn("TABLE_CAT", Type.STRING_TYPE, + "Table catalog (may be null)") + .addPrimitiveColumn("TABLE_SCHEM", Type.STRING_TYPE, + "Table schema (may be null)") + .addPrimitiveColumn("TABLE_NAME", Type.STRING_TYPE, + "Table name") + .addPrimitiveColumn("COLUMN_NAME", Type.STRING_TYPE, + "Column name") + .addPrimitiveColumn("KEQ_SEQ", Type.INT_TYPE, + "Sequence number within primary key") + .addPrimitiveColumn("PK_NAME", Type.STRING_TYPE, + "Primary key name (may be null)"); + + private final String catalogName; + private final String schemaName; + private final String tableName; + + private final RowSet rowSet; + + public GetPrimaryKeysOperation(HiveSession parentSession, + String catalogName, String schemaName, String tableName) { + super(parentSession, OperationType.GET_FUNCTIONS); + this.catalogName = catalogName; + this.schemaName = schemaName; + this.tableName = tableName; + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); + } + + @Override + public void runInternal() throws HiveSQLException { + setState(OperationState.RUNNING); + try { + IMetaStoreClient metastoreClient = getParentSession().getMetaStoreClient(); + PrimaryKeysRequest sqlReq = new PrimaryKeysRequest(schemaName, tableName); + List pks = metastoreClient.getPrimaryKeys(sqlReq); + if (pks == null) { + return; + } + for (SQLPrimaryKey pk : pks) { + rowSet.addRow(new Object[] {catalogName, pk.getTable_db(), + pk.getTable_name(), pk.getColumn_name(), pk.getKey_seq(), pk.getPk_name()}); + } + setState(OperationState.FINISHED); + } catch (Exception e) { + setState(OperationState.ERROR); + throw new HiveSQLException(e); + } + } + + + /* (non-Javadoc) + * @see org.apache.hive.service.cli.Operation#getResultSetSchema() + */ + @Override + public TableSchema getResultSetSchema() throws HiveSQLException { + assertState(OperationState.FINISHED); + return RESULT_SET_SCHEMA; + } + + /* (non-Javadoc) + * @see org.apache.hive.service.cli.Operation#getNextRowSet(org.apache.hive.service.cli.FetchOrientation, long) + */ + @Override + public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws HiveSQLException { + assertState(OperationState.FINISHED); + validateDefaultFetchOrientation(orientation); + if (orientation.equals(FetchOrientation.FETCH_FIRST)) { + rowSet.setStartOffset(0); + } + return rowSet.extractSubset((int)maxRows); + } +} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java index 3516bc2ba242c..f224e1f1f9474 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetSchemasOperation.java @@ -48,7 +48,7 @@ protected GetSchemasOperation(HiveSession parentSession, super(parentSession, OperationType.GET_SCHEMAS); this.catalogName = catalogName; this.schemaName = schemaName; - this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java index 3ae012a72764f..875af7150fc16 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTableTypesOperation.java @@ -48,7 +48,7 @@ protected GetTableTypesOperation(HiveSession parentSession) { .getVar(HiveConf.ConfVars.HIVE_SERVER2_TABLE_TYPE_MAPPING); tableTypeMapping = TableTypeMappingFactory.getTableTypeMapping(tableMappingStr); - rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java index 2af17a662a296..ebcbfbdf15327 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTablesOperation.java @@ -19,11 +19,12 @@ package org.apache.hive.service.cli.operation; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.IMetaStoreClient; -import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.metastore.api.TableMeta; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveOperationType; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObject; import org.apache.hadoop.hive.ql.security.authorization.plugin.HivePrivilegeObjectUtils; @@ -45,7 +46,7 @@ public class GetTablesOperation extends MetadataOperation { private final String catalogName; private final String schemaName; private final String tableName; - private final List tableTypes = new ArrayList(); + private final List tableTypeList; protected final RowSet rowSet; private final TableTypeMapping tableTypeMapping; @@ -55,7 +56,14 @@ public class GetTablesOperation extends MetadataOperation { .addStringColumn("TABLE_SCHEM", "Schema name.") .addStringColumn("TABLE_NAME", "Table name.") .addStringColumn("TABLE_TYPE", "The table type, e.g. \"TABLE\", \"VIEW\", etc.") - .addStringColumn("REMARKS", "Comments about the table."); + .addStringColumn("REMARKS", "Comments about the table.") + .addStringColumn("TYPE_CAT", "The types catalog.") + .addStringColumn("TYPE_SCHEM", "The types schema.") + .addStringColumn("TYPE_NAME", "Type name.") + .addStringColumn("SELF_REFERENCING_COL_NAME", + "Name of the designated \"identifier\" column of a typed table.") + .addStringColumn("REF_GENERATION", + "Specifies how values in SELF_REFERENCING_COL_NAME are created."); protected GetTablesOperation(HiveSession parentSession, String catalogName, String schemaName, String tableName, @@ -69,9 +77,14 @@ protected GetTablesOperation(HiveSession parentSession, tableTypeMapping = TableTypeMappingFactory.getTableTypeMapping(tableMappingStr); if (tableTypes != null) { - this.tableTypes.addAll(tableTypes); + tableTypeList = new ArrayList(); + for (String tableType : tableTypes) { + tableTypeList.addAll(Arrays.asList(tableTypeMapping.mapToHiveType(tableType.trim()))); + } + } else { + tableTypeList = null; } - this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + this.rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override @@ -88,21 +101,16 @@ public void runInternal() throws HiveSQLException { } String tablePattern = convertIdentifierPattern(tableName, true); - for (String dbName : metastoreClient.getDatabases(schemaPattern)) { - List tableNames = metastoreClient.getTables(dbName, tablePattern); - for (Table table : metastoreClient.getTableObjectsByName(dbName, tableNames)) { - Object[] rowData = new Object[] { + for (TableMeta tableMeta : + metastoreClient.getTableMeta(schemaPattern, tablePattern, tableTypeList)) { + rowSet.addRow(new Object[] { DEFAULT_HIVE_CATALOG, - table.getDbName(), - table.getTableName(), - tableTypeMapping.mapToClientType(table.getTableType()), - table.getParameters().get("comment") - }; - if (tableTypes.isEmpty() || tableTypes.contains( - tableTypeMapping.mapToClientType(table.getTableType()))) { - rowSet.addRow(rowData); - } - } + tableMeta.getDbName(), + tableMeta.getTableName(), + tableTypeMapping.mapToClientType(tableMeta.getTableType()), + tableMeta.getComments(), + null, null, null, null, null + }); } setState(OperationState.FINISHED); } catch (Exception e) { diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java index 0f72071d7e7d1..9612eb145638c 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java @@ -19,6 +19,7 @@ package org.apache.hive.service.cli.operation; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveOperationType; +import org.apache.hadoop.hive.serde2.thrift.Type; import org.apache.hive.service.cli.FetchOrientation; import org.apache.hive.service.cli.HiveSQLException; import org.apache.hive.service.cli.OperationState; @@ -26,7 +27,6 @@ import org.apache.hive.service.cli.RowSet; import org.apache.hive.service.cli.RowSetFactory; import org.apache.hive.service.cli.TableSchema; -import org.apache.hive.service.cli.Type; import org.apache.hive.service.cli.session.HiveSession; /** @@ -77,7 +77,7 @@ public class GetTypeInfoOperation extends MetadataOperation { protected GetTypeInfoOperation(HiveSession parentSession) { super(parentSession, OperationType.GET_TYPE_INFO); - rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion()); + rowSet = RowSetFactory.create(RESULT_SET_SCHEMA, getProtocolVersion(), false); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java index bcc66cf811b20..95214f4b6ba0d 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java @@ -34,7 +34,7 @@ import org.apache.hadoop.hive.ql.processors.CommandProcessor; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; import org.apache.hadoop.hive.ql.session.SessionState; -import org.apache.hadoop.io.IOUtils; +import org.apache.hive.service.ServiceUtils; import org.apache.hive.service.cli.FetchOrientation; import org.apache.hive.service.cli.HiveSQLException; import org.apache.hive.service.cli.OperationState; @@ -90,8 +90,8 @@ private void setupSessionIO(SessionState sessionState) { private void tearDownSessionIO() { - IOUtils.cleanup(LOG, parentSession.getSessionState().out); - IOUtils.cleanup(LOG, parentSession.getSessionState().err); + ServiceUtils.cleanup(LOG, + parentSession.getSessionState().out, parentSession.getSessionState().err); } @Override @@ -154,7 +154,7 @@ public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws H resetResultReader(); } List rows = readResults((int) maxRows); - RowSet rowSet = RowSetFactory.create(resultSchema, getProtocolVersion()); + RowSet rowSet = RowSetFactory.create(resultSchema, getProtocolVersion(), false); for (String row : rows) { rowSet.addRow(new String[] {row}); @@ -200,13 +200,13 @@ private List readResults(int nLines) throws HiveSQLException { private void cleanTmpFile() { resetResultReader(); SessionState sessionState = getParentSession().getSessionState(); - File tmp = sessionState.getTmpOutputFile(); - tmp.delete(); + sessionState.deleteTmpOutputFile(); + sessionState.deleteTmpErrOutputFile(); } private void resetResultReader() { if (resultReader != null) { - IOUtils.cleanup(LOG, resultReader); + ServiceUtils.cleanup(LOG, resultReader); resultReader = null; } } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java index b530f217125b8..f8eb50ea3b242 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/HiveTableTypeMapping.java @@ -31,8 +31,8 @@ public class HiveTableTypeMapping implements TableTypeMapping { @Override - public String mapToHiveType(String clientTypeName) { - return clientTypeName; + public String[] mapToHiveType(String clientTypeName) { + return new String[] {mapToClientType(clientTypeName)}; } @Override @@ -44,7 +44,7 @@ public String mapToClientType(String hiveTypeName) { public Set getTableTypeNames() { Set typeNameSet = new HashSet(); for (TableType typeNames : TableType.values()) { - typeNameSet.add(typeNames.toString()); + typeNameSet.add(typeNames.name()); } return typeNameSet; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java index 6c819876a556d..cd82716134a99 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java @@ -44,7 +44,7 @@ public abstract class MetadataOperation extends Operation { private static final char SEARCH_STRING_ESCAPE = '\\'; protected MetadataOperation(HiveSession parentSession, OperationType opType) { - super(parentSession, opType, false); + super(parentSession, opType); setHasResultSet(true); } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/Operation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/Operation.java index 19153b654b08a..788fcdee282ae 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/Operation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/Operation.java @@ -20,12 +20,13 @@ import java.io.File; import java.io.FileNotFoundException; import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.QueryState; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; import org.apache.hadoop.hive.ql.session.OperationLog; import org.apache.hive.service.cli.FetchOrientation; @@ -37,14 +38,16 @@ import org.apache.hive.service.cli.RowSet; import org.apache.hive.service.cli.TableSchema; import org.apache.hive.service.cli.session.HiveSession; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public abstract class Operation { protected final HiveSession parentSession; private OperationState state = OperationState.INITIALIZED; private final OperationHandle opHandle; private HiveConf configuration; - public static final Log LOG = LogFactory.getLog(Operation.class.getName()); + public static final Logger LOG = LoggerFactory.getLogger(Operation.class.getName()); public static final FetchOrientation DEFAULT_FETCH_ORIENTATION = FetchOrientation.FETCH_NEXT; public static final long DEFAULT_FETCH_MAX_ROWS = 100; protected boolean hasResultSet; @@ -53,20 +56,35 @@ public abstract class Operation { protected volatile Future backgroundHandle; protected OperationLog operationLog; protected boolean isOperationLogEnabled; + protected Map confOverlay = new HashMap(); private long operationTimeout; private long lastAccessTime; + protected final QueryState queryState; + protected static final EnumSet DEFAULT_FETCH_ORIENTATION_SET = EnumSet.of(FetchOrientation.FETCH_NEXT,FetchOrientation.FETCH_FIRST); - protected Operation(HiveSession parentSession, OperationType opType, boolean runInBackground) { + protected Operation(HiveSession parentSession, OperationType opType) { + this(parentSession, null, opType); + } + + protected Operation(HiveSession parentSession, Map confOverlay, + OperationType opType) { + this(parentSession, confOverlay, opType, false); + } + + protected Operation(HiveSession parentSession, + Map confOverlay, OperationType opType, boolean runInBackground) { this.parentSession = parentSession; + this.confOverlay = confOverlay; this.runAsync = runInBackground; this.opHandle = new OperationHandle(opType, parentSession.getProtocolVersion()); lastAccessTime = System.currentTimeMillis(); operationTimeout = HiveConf.getTimeVar(parentSession.getHiveConf(), HiveConf.ConfVars.HIVE_SERVER2_IDLE_OPERATION_TIMEOUT, TimeUnit.MILLISECONDS); + queryState = new QueryState(parentSession.getHiveConf(), confOverlay, runInBackground); } public Future getBackgroundHandle() { @@ -319,4 +337,8 @@ protected HiveSQLException toSQLException(String prefix, CommandProcessorRespons } return ex; } + + protected Map getConfOverlay() { + return confOverlay; + } } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java index 92c340a29c107..75edc5763ce44 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/OperationManager.java @@ -24,8 +24,6 @@ import java.util.List; import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Schema; @@ -41,14 +39,15 @@ import org.apache.hive.service.cli.TableSchema; import org.apache.hive.service.cli.session.HiveSession; import org.apache.log4j.Appender; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * OperationManager. * */ public class OperationManager extends AbstractService { - private final Log LOG = LogFactory.getLog(OperationManager.class.getName()); + private final Logger LOG = LoggerFactory.getLogger(OperationManager.class.getName()); private final Map handleToOperation = new HashMap(); @@ -83,18 +82,24 @@ public synchronized void stop() { private void initOperationLogCapture(String loggingMode) { // Register another Appender (with the same layout) that talks to us. Appender ap = new LogDivertAppender(this, OperationLog.getLoggingLevel(loggingMode)); - Logger.getRootLogger().addAppender(ap); + org.apache.log4j.Logger.getRootLogger().addAppender(ap); } public ExecuteStatementOperation newExecuteStatementOperation(HiveSession parentSession, String statement, Map confOverlay, boolean runAsync) throws HiveSQLException { ExecuteStatementOperation executeStatementOperation = ExecuteStatementOperation - .newExecuteStatementOperation(parentSession, statement, confOverlay, runAsync); + .newExecuteStatementOperation(parentSession, statement, confOverlay, runAsync, 0); addOperation(executeStatementOperation); return executeStatementOperation; } + public ExecuteStatementOperation newExecuteStatementOperation(HiveSession parentSession, + String statement, Map confOverlay, boolean runAsync, long queryTimeout) + throws HiveSQLException { + return newExecuteStatementOperation(parentSession, statement, confOverlay, runAsync); + } + public GetTypeInfoOperation newGetTypeInfoOperation(HiveSession parentSession) { GetTypeInfoOperation operation = new GetTypeInfoOperation(parentSession); addOperation(operation); @@ -145,6 +150,25 @@ public GetFunctionsOperation newGetFunctionsOperation(HiveSession parentSession, return operation; } + public GetPrimaryKeysOperation newGetPrimaryKeysOperation(HiveSession parentSession, + String catalogName, String schemaName, String tableName) { + GetPrimaryKeysOperation operation = new GetPrimaryKeysOperation(parentSession, + catalogName, schemaName, tableName); + addOperation(operation); + return operation; + } + + public GetCrossReferenceOperation newGetCrossReferenceOperation( + HiveSession session, String primaryCatalog, String primarySchema, + String primaryTable, String foreignCatalog, String foreignSchema, + String foreignTable) { + GetCrossReferenceOperation operation = new GetCrossReferenceOperation(session, + primaryCatalog, primarySchema, primaryTable, foreignCatalog, foreignSchema, + foreignTable); + addOperation(operation); + return operation; + } + public Operation getOperation(OperationHandle operationHandle) throws HiveSQLException { Operation operation = getOperationInternal(operationHandle); if (operation == null) { @@ -240,7 +264,8 @@ public RowSet getOperationLogRowSet(OperationHandle opHandle, // convert logs to RowSet TableSchema tableSchema = new TableSchema(getLogSchema()); - RowSet rowSet = RowSetFactory.create(tableSchema, getOperation(opHandle).getProtocolVersion()); + RowSet rowSet = RowSetFactory.create(tableSchema, + getOperation(opHandle).getProtocolVersion(), false); for (String log : logs) { rowSet.addRow(new String[] {log}); } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java index 70c27948de61b..7bfd502b60447 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java @@ -36,15 +36,15 @@ import org.apache.hadoop.hive.metastore.api.Schema; import org.apache.hadoop.hive.ql.CommandNeedRetryException; import org.apache.hadoop.hive.ql.Driver; +import org.apache.hadoop.hive.ql.QueryState; import org.apache.hadoop.hive.ql.exec.ExplainTask; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; -import org.apache.hadoop.hive.ql.parse.VariableSubstitution; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde.serdeConstants; -import org.apache.hadoop.hive.serde2.SerDe; +import org.apache.hadoop.hive.serde2.AbstractSerDe; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -73,25 +73,25 @@ public class SQLOperation extends ExecuteStatementOperation { private CommandProcessorResponse response; private TableSchema resultSchema = null; private Schema mResultSchema = null; - private SerDe serde = null; + private AbstractSerDe serde = null; private boolean fetchStarted = false; - public SQLOperation(HiveSession parentSession, String statement, Map confOverlay, boolean runInBackground) { + public SQLOperation(HiveSession parentSession, String statement, Map confOverlay, + boolean runInBackground, long queryTimeout) { // TODO: call setRemoteUser in ExecuteStatementOperation or higher. super(parentSession, statement, confOverlay, runInBackground); } /*** * Compile the query and extract metadata - * @param sqlOperationConf + * @param queryState * @throws HiveSQLException */ - public void prepare(HiveConf sqlOperationConf) throws HiveSQLException { + public void prepare(QueryState queryState) throws HiveSQLException { setState(OperationState.RUNNING); try { - driver = new Driver(sqlOperationConf, getParentSession().getUserName()); + driver = new Driver(queryState, getParentSession().getUserName()); // set the operation handle information in Driver, so that thrift API users // can use the operation handle they receive, to lookup query information in @@ -105,8 +105,7 @@ public void prepare(HiveConf sqlOperationConf) throws HiveSQLException { // For now, we disable the test attempts. driver.setTryCount(Integer.MAX_VALUE); - String subStatement = new VariableSubstitution().substitute(sqlOperationConf, statement); - response = driver.compileAndRespond(subStatement); + response = driver.compileAndRespond(statement); if (0 != response.getResponseCode()) { throw toSQLException("Error while compiling statement", response); } @@ -177,7 +176,7 @@ private void runQuery(HiveConf sqlOperationConf) throws HiveSQLException { public void runInternal() throws HiveSQLException { setState(OperationState.PENDING); final HiveConf opConfig = getConfigForOperation(); - prepare(opConfig); + prepare(queryState); if (!shouldRunAsync()) { runQuery(opConfig); } else { @@ -320,7 +319,7 @@ public RowSet getNextRowSet(FetchOrientation orientation, long maxRows) throws H validateDefaultFetchOrientation(orientation); assertState(OperationState.FINISHED); - RowSet rowSet = RowSetFactory.create(resultSchema, getProtocolVersion()); + RowSet rowSet = RowSetFactory.create(resultSchema, getProtocolVersion(), false); try { /* if client is requesting fetch-from-start and its not the first time reading from this operation @@ -389,7 +388,7 @@ private RowSet decodeFromString(List rows, RowSet rowSet) return rowSet; } - private SerDe getSerDe() throws SQLException { + private AbstractSerDe getSerDe() throws SQLException { if (serde != null) { return serde; } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java index e59d19ea6be42..d7671870a47e5 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/TableTypeMapping.java @@ -20,14 +20,18 @@ import java.util.Set; +import org.apache.hadoop.hive.common.classification.InterfaceAudience; +import org.apache.hadoop.hive.common.classification.InterfaceStability; +@InterfaceAudience.Public +@InterfaceStability.Evolving public interface TableTypeMapping { /** * Map client's table type name to hive's table type * @param clientTypeName * @return */ - String mapToHiveType(String clientTypeName); + String[] mapToHiveType(String clientTypeName); /** * Map hive's table type name to client's table type diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSession.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSession.java index 65f9b298bf4f6..8bb64350e696c 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSession.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSession.java @@ -53,11 +53,32 @@ OperationHandle executeStatement(String statement, * execute operation handler * @param statement * @param confOverlay + * @param queryTimeout * @return * @throws HiveSQLException */ - OperationHandle executeStatementAsync(String statement, - Map confOverlay) throws HiveSQLException; + OperationHandle executeStatement(String statement, Map confOverlay, + long queryTimeout) throws HiveSQLException; + + /** + * execute operation handler + * @param statement + * @param confOverlay + * @return + * @throws HiveSQLException + */ + OperationHandle executeStatementAsync(String statement, Map confOverlay) throws HiveSQLException; + + /** + * execute operation handler + * @param statement + * @param confOverlay + * @param queryTimeout + * @return + * @throws HiveSQLException + */ + OperationHandle executeStatementAsync(String statement, Map confOverlay, + long queryTimeout) throws HiveSQLException; /** * getTypeInfo operation handler @@ -125,6 +146,33 @@ OperationHandle getColumns(String catalogName, String schemaName, OperationHandle getFunctions(String catalogName, String schemaName, String functionName) throws HiveSQLException; + /** + * getPrimaryKeys operation handler + * @param catalog + * @param schema + * @param table + * @return + * @throws HiveSQLException + */ + OperationHandle getPrimaryKeys(String catalog, String schema, + String table) throws HiveSQLException; + + + /** + * getCrossReference operation handler + * @param primaryCatalog + * @param primarySchema + * @param primaryTable + * @param foreignCatalog + * @param foreignSchema + * @param foreignTable + * @return + * @throws HiveSQLException + */ + OperationHandle getCrossReference(String primaryCatalog, + String primarySchema, String primaryTable, String foreignCatalog, + String foreignSchema, String foreignTable) throws HiveSQLException; + /** * close the session * @throws HiveSQLException diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java index b72c18b2b2135..fb6a7ceecab16 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionBase.java @@ -22,7 +22,7 @@ import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hive.service.cli.SessionHandle; import org.apache.hive.service.cli.operation.OperationManager; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; import java.io.File; diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/PatternOrIdentifier.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java similarity index 58% rename from sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/PatternOrIdentifier.java rename to sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java index 6e4d43fd5df63..c56a107d42466 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/PatternOrIdentifier.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContext.java @@ -16,32 +16,31 @@ * limitations under the License. */ -package org.apache.hive.service.cli; +package org.apache.hive.service.cli.session; +import org.apache.hadoop.hive.conf.HiveConf; /** - * PatternOrIdentifier. - * + * HiveSessionHookContext. + * Interface passed to the HiveServer2 session hook execution. This enables + * the hook implementation to access session config, user and session handle */ -public class PatternOrIdentifier { - - boolean isPattern = false; - String text; - - public PatternOrIdentifier(String tpoi) { - text = tpoi; - isPattern = false; - } +public interface HiveSessionHookContext { - public boolean isPattern() { - return isPattern; - } + /** + * Retrieve session conf + * @return + */ + HiveConf getSessionConf(); - public boolean isIdentifier() { - return !isPattern; - } + /** + * The get the username starting the session + * @return + */ + String getSessionUser(); - @Override - public String toString() { - return text; - } + /** + * Retrieve handle for the session + * @return + */ + String getSessionHandle(); } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java new file mode 100644 index 0000000000000..1ee4ac8a1d39f --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionHookContextImpl.java @@ -0,0 +1,52 @@ +/** + * 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. + */ + +package org.apache.hive.service.cli.session; + +import org.apache.hadoop.hive.conf.HiveConf; + +/** + * + * HiveSessionHookContextImpl. + * Session hook context implementation which is created by session manager + * and passed to hook invocation. + */ +public class HiveSessionHookContextImpl implements HiveSessionHookContext { + + private final HiveSession hiveSession; + + HiveSessionHookContextImpl(HiveSession hiveSession) { + this.hiveSession = hiveSession; + } + + @Override + public HiveConf getSessionConf() { + return hiveSession.getHiveConf(); + } + + + @Override + public String getSessionUser() { + return hiveSession.getUserName(); + } + + @Override + public String getSessionHandle() { + return hiveSession.getSessionHandle().toString(); + } +} diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java index 745f385e87f78..14e9c4704c977 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java @@ -30,22 +30,20 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.common.cli.HiveFileProcessor; import org.apache.hadoop.hive.common.cli.IHiveFileProcessor; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.conf.VariableSubstitution; import org.apache.hadoop.hive.metastore.IMetaStoreClient; import org.apache.hadoop.hive.metastore.api.MetaException; -import org.apache.hadoop.hive.ql.exec.FetchFormatter; -import org.apache.hadoop.hive.ql.exec.ListSinkOperator; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.history.HiveHistory; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; -import org.apache.hadoop.hive.ql.parse.VariableSubstitution; import org.apache.hadoop.hive.ql.session.SessionState; +import org.apache.hadoop.hive.serde2.SerDeUtils; +import org.apache.hadoop.hive.serde2.thrift.ThriftFormatter; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hive.common.util.HiveVersionInfo; import org.apache.hive.service.auth.HiveAuthFactory; @@ -61,15 +59,19 @@ import org.apache.hive.service.cli.operation.ExecuteStatementOperation; import org.apache.hive.service.cli.operation.GetCatalogsOperation; import org.apache.hive.service.cli.operation.GetColumnsOperation; +import org.apache.hive.service.cli.operation.GetCrossReferenceOperation; import org.apache.hive.service.cli.operation.GetFunctionsOperation; +import org.apache.hive.service.cli.operation.GetPrimaryKeysOperation; import org.apache.hive.service.cli.operation.GetSchemasOperation; import org.apache.hive.service.cli.operation.GetTableTypesOperation; import org.apache.hive.service.cli.operation.GetTypeInfoOperation; import org.apache.hive.service.cli.operation.MetadataOperation; import org.apache.hive.service.cli.operation.Operation; import org.apache.hive.service.cli.operation.OperationManager; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; import org.apache.hive.service.server.ThreadWithGarbageCleanup; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import static org.apache.hadoop.hive.conf.SystemVariables.ENV_PREFIX; import static org.apache.hadoop.hive.conf.SystemVariables.HIVECONF_PREFIX; @@ -90,7 +92,7 @@ public class HiveSessionImpl implements HiveSession { private String ipAddress; private static final String FETCH_WORK_SERDE_CLASS = "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"; - private static final Log LOG = LogFactory.getLog(HiveSessionImpl.class); + private static final Logger LOG = LoggerFactory.getLogger(HiveSessionImpl.class); private SessionManager sessionManager; private OperationManager operationManager; private final Set opHandleSet = new HashSet(); @@ -121,9 +123,8 @@ public HiveSessionImpl(TProtocolVersion protocol, String username, String passwo hiveConf.set(ConfVars.HIVESESSIONID.varname, sessionHandle.getHandleIdentifier().toString()); // Use thrift transportable formatter - hiveConf.set(ListSinkOperator.OUTPUT_FORMATTER, - FetchFormatter.ThriftFormatter.class.getName()); - hiveConf.setInt(ListSinkOperator.OUTPUT_PROTOCOL, protocol.getValue()); + hiveConf.set(SerDeUtils.LIST_SINK_OUTPUT_FORMATTER, ThriftFormatter.class.getName()); + hiveConf.setInt(SerDeUtils.LIST_SINK_OUTPUT_PROTOCOL, protocol.getValue()); } @Override @@ -142,7 +143,8 @@ public void open(Map sessionConfMap) throws HiveSQLException { sessionState.setIsHiveServerQuery(true); SessionState.start(sessionState); try { - sessionState.reloadAuxJars(); + sessionState.loadAuxJars(); + sessionState.loadReloadableAuxJars(); } catch (IOException e) { String msg = "Failed to load reloadable jar file path: " + e; LOG.error(msg, e); @@ -175,7 +177,7 @@ protected int processCmd(String cmd) { int rc = 0; String cmd_trimed = cmd.trim(); try { - executeStatementInternal(cmd_trimed, null, false); + executeStatementInternal(cmd_trimed, null, false, 0); } catch (HiveSQLException e) { rc = -1; LOG.warn("Failed to execute HQL command in global .hiverc file.", e); @@ -231,6 +233,7 @@ private void configureSession(Map sessionConfMap) throws HiveSQL // setConf(varname, propName, varvalue, true) when varname.startsWith(HIVECONF_PREFIX) public static int setVariable(String varname, String varvalue) throws Exception { SessionState ss = SessionState.get(); + VariableSubstitution substitution = new VariableSubstitution(() -> ss.getHiveVariables()); if (varvalue.contains("\n")){ ss.err.println("Warning: Value had a \\n character in it."); } @@ -240,19 +243,17 @@ public static int setVariable(String varname, String varvalue) throws Exception return 1; } else if (varname.startsWith(SYSTEM_PREFIX)){ String propName = varname.substring(SYSTEM_PREFIX.length()); - System.getProperties().setProperty(propName, - new VariableSubstitution().substitute(ss.getConf(),varvalue)); + System.getProperties().setProperty(propName, substitution.substitute(ss.getConf(),varvalue)); } else if (varname.startsWith(HIVECONF_PREFIX)){ String propName = varname.substring(HIVECONF_PREFIX.length()); setConf(varname, propName, varvalue, true); } else if (varname.startsWith(HIVEVAR_PREFIX)) { String propName = varname.substring(HIVEVAR_PREFIX.length()); - ss.getHiveVariables().put(propName, - new VariableSubstitution().substitute(ss.getConf(),varvalue)); + ss.getHiveVariables().put(propName, substitution.substitute(ss.getConf(),varvalue)); } else if (varname.startsWith(METACONF_PREFIX)) { String propName = varname.substring(METACONF_PREFIX.length()); Hive hive = Hive.get(ss.getConf()); - hive.setMetaConf(propName, new VariableSubstitution().substitute(ss.getConf(), varvalue)); + hive.setMetaConf(propName, substitution.substitute(ss.getConf(), varvalue)); } else { setConf(varname, varname, varvalue, true); } @@ -262,8 +263,10 @@ public static int setVariable(String varname, String varvalue) throws Exception // returns non-null string for validation fail private static void setConf(String varname, String key, String varvalue, boolean register) throws IllegalArgumentException { + VariableSubstitution substitution = + new VariableSubstitution(() -> SessionState.get().getHiveVariables()); HiveConf conf = SessionState.get().getConf(); - String value = new VariableSubstitution().substitute(conf, varvalue); + String value = substitution.substitute(conf, varvalue); if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) { HiveConf.ConfVars confVars = HiveConf.getConfVars(key); if (confVars != null) { @@ -448,23 +451,34 @@ public GetInfoValue getInfo(GetInfoType getInfoType) @Override public OperationHandle executeStatement(String statement, Map confOverlay) throws HiveSQLException { - return executeStatementInternal(statement, confOverlay, false); + return executeStatementInternal(statement, confOverlay, false, 0); + } + + @Override + public OperationHandle executeStatement(String statement, Map confOverlay, + long queryTimeout) throws HiveSQLException { + return executeStatementInternal(statement, confOverlay, false, queryTimeout); } @Override public OperationHandle executeStatementAsync(String statement, Map confOverlay) throws HiveSQLException { - return executeStatementInternal(statement, confOverlay, true); + return executeStatementInternal(statement, confOverlay, true, 0); } - private OperationHandle executeStatementInternal(String statement, Map confOverlay, - boolean runAsync) - throws HiveSQLException { + @Override + public OperationHandle executeStatementAsync(String statement, Map confOverlay, + long queryTimeout) throws HiveSQLException { + return executeStatementInternal(statement, confOverlay, true, queryTimeout); + } + + private OperationHandle executeStatementInternal(String statement, + Map confOverlay, boolean runAsync, long queryTimeout) throws HiveSQLException { acquire(true); OperationManager operationManager = getOperationManager(); ExecuteStatementOperation operation = operationManager - .newExecuteStatementOperation(getSession(), statement, confOverlay, runAsync); + .newExecuteStatementOperation(getSession(), statement, confOverlay, runAsync, queryTimeout); OperationHandle opHandle = operation.getHandle(); try { operation.run(); @@ -808,7 +822,7 @@ public void setIpAddress(String ipAddress) { public String getDelegationToken(HiveAuthFactory authFactory, String owner, String renewer) throws HiveSQLException { HiveAuthFactory.verifyProxyAccess(getUsername(), owner, getIpAddress(), getHiveConf()); - return authFactory.getDelegationToken(owner, renewer); + return authFactory.getDelegationToken(owner, renewer, getIpAddress()); } @Override @@ -831,4 +845,49 @@ public void renewDelegationToken(HiveAuthFactory authFactory, String tokenStr) private String getUserFromToken(HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException { return authFactory.getUserFromToken(tokenStr); } + + @Override + public OperationHandle getPrimaryKeys(String catalog, String schema, + String table) throws HiveSQLException { + acquire(true); + + OperationManager operationManager = getOperationManager(); + GetPrimaryKeysOperation operation = operationManager + .newGetPrimaryKeysOperation(getSession(), catalog, schema, table); + OperationHandle opHandle = operation.getHandle(); + try { + operation.run(); + opHandleSet.add(opHandle); + return opHandle; + } catch (HiveSQLException e) { + operationManager.closeOperation(opHandle); + throw e; + } finally { + release(true); + } + } + + @Override + public OperationHandle getCrossReference(String primaryCatalog, + String primarySchema, String primaryTable, String foreignCatalog, + String foreignSchema, String foreignTable) throws HiveSQLException { + acquire(true); + + OperationManager operationManager = getOperationManager(); + GetCrossReferenceOperation operation = operationManager + .newGetCrossReferenceOperation(getSession(), primaryCatalog, + primarySchema, primaryTable, foreignCatalog, + foreignSchema, foreignTable); + OperationHandle opHandle = operation.getHandle(); + try { + operation.run(); + opHandleSet.add(opHandle); + return opHandle; + } catch (HiveSQLException e) { + operationManager.closeOperation(opHandle); + throw e; + } finally { + release(true); + } + } } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java index 762dbb2faadec..bf2cf3c07f6b4 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java @@ -20,8 +20,6 @@ import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.metadata.Hive; @@ -30,7 +28,9 @@ import org.apache.hadoop.security.UserGroupInformation; import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.cli.HiveSQLException; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -44,7 +44,7 @@ public class HiveSessionImplwithUGI extends HiveSessionImpl { private String delegationTokenStr = null; private Hive sessionHive = null; private HiveSession proxySession = null; - static final Log LOG = LogFactory.getLog(HiveSessionImplwithUGI.class); + static final Logger LOG = LoggerFactory.getLogger(HiveSessionImplwithUGI.class); public HiveSessionImplwithUGI(TProtocolVersion protocol, String username, String password, HiveConf hiveConf, String ipAddress, String delegationToken) throws HiveSQLException { @@ -164,7 +164,7 @@ public void setProxySession(HiveSession proxySession) { @Override public String getDelegationToken(HiveAuthFactory authFactory, String owner, String renewer) throws HiveSQLException { - return authFactory.getDelegationToken(owner, renewer); + return authFactory.getDelegationToken(owner, renewer, getIpAddress()); } @Override diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/SessionManager.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/SessionManager.java index 859f9c8b449e5..49221b13bb892 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/SessionManager.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/session/SessionManager.java @@ -30,17 +30,17 @@ import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hive.service.CompositeService; import org.apache.hive.service.cli.HiveSQLException; import org.apache.hive.service.cli.SessionHandle; import org.apache.hive.service.cli.operation.OperationManager; -import org.apache.hive.service.cli.thrift.TProtocolVersion; +import org.apache.hive.service.rpc.thrift.TProtocolVersion; import org.apache.hive.service.server.HiveServer2; import org.apache.hive.service.server.ThreadFactoryWithGarbageCleanup; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * SessionManager. @@ -48,7 +48,7 @@ */ public class SessionManager extends CompositeService { - private static final Log LOG = LogFactory.getLog(SessionManager.class); + private static final Logger LOG = LoggerFactory.getLogger(SessionManager.class); public static final String HIVERCFILE = ".hiverc"; private HiveConf hiveConf; private final Map handleToSession = diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java index 21b8bf7de75ce..fc19c65daaf54 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftBinaryCLIService.java @@ -25,6 +25,7 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import org.apache.hadoop.hive.common.auth.HiveAuthUtils; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.shims.ShimLoader; @@ -63,7 +64,7 @@ public void run() { sslVersionBlacklist.add(sslVersion); } if (!hiveConf.getBoolVar(ConfVars.HIVE_SERVER2_USE_SSL)) { - serverSocket = HiveAuthFactory.getServerSocket(hiveHost, portNum); + serverSocket = HiveAuthUtils.getServerSocket(hiveHost, portNum); } else { String keyStorePath = hiveConf.getVar(ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PATH).trim(); if (keyStorePath.isEmpty()) { @@ -72,7 +73,7 @@ public void run() { } String keyStorePassword = ShimLoader.getHadoopShims().getPassword(hiveConf, HiveConf.ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PASSWORD.varname); - serverSocket = HiveAuthFactory.getServerSSLSocket(hiveHost, portNum, keyStorePath, + serverSocket = HiveAuthUtils.getServerSSLSocket(hiveHost, portNum, keyStorePath, keyStorePassword, sslVersionBlacklist); } @@ -94,11 +95,11 @@ public void run() { server = new TThreadPoolServer(sargs); server.setServerEventHandler(serverEventHandler); String msg = "Starting " + ThriftBinaryCLIService.class.getSimpleName() + " on port " - + serverSocket.getServerSocket().getLocalPort() + " with " + minWorkerThreads + "..." + maxWorkerThreads + " worker threads"; + + portNum + " with " + minWorkerThreads + "..." + maxWorkerThreads + " worker threads"; LOG.info(msg); server.serve(); } catch (Throwable t) { - LOG.fatal( + LOG.error( "Error starting HiveServer2: could not start " + ThriftBinaryCLIService.class.getSimpleName(), t); System.exit(-1); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java index ad7a9a238f8a9..9552d9bd68cd5 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -26,8 +26,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hive.service.AbstractService; @@ -37,6 +35,7 @@ import org.apache.hive.service.auth.TSetIpAddressProcessor; import org.apache.hive.service.cli.*; import org.apache.hive.service.cli.session.SessionManager; +import org.apache.hive.service.rpc.thrift.*; import org.apache.hive.service.server.HiveServer2; import org.apache.thrift.TException; import org.apache.thrift.protocol.TProtocol; @@ -44,6 +43,8 @@ import org.apache.thrift.server.TServer; import org.apache.thrift.server.TServerEventHandler; import org.apache.thrift.transport.TTransport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ThriftCLIService. @@ -51,7 +52,7 @@ */ public abstract class ThriftCLIService extends AbstractService implements TCLIService.Iface, Runnable { - public static final Log LOG = LogFactory.getLog(ThriftCLIService.class.getName()); + public static final Logger LOG = LoggerFactory.getLogger(ThriftCLIService.class.getName()); protected CLIService cliService; private static final TStatus OK_STATUS = new TStatus(TStatusCode.SUCCESS_STATUS); @@ -432,9 +433,10 @@ public TExecuteStatementResp ExecuteStatement(TExecuteStatementReq req) throws T String statement = req.getStatement(); Map confOverlay = req.getConfOverlay(); Boolean runAsync = req.isRunAsync(); + long queryTimeout = req.getQueryTimeout(); OperationHandle operationHandle = runAsync ? - cliService.executeStatementAsync(sessionHandle, statement, confOverlay) - : cliService.executeStatement(sessionHandle, statement, confOverlay); + cliService.executeStatementAsync(sessionHandle, statement, confOverlay, queryTimeout) + : cliService.executeStatement(sessionHandle, statement, confOverlay, queryTimeout); resp.setOperationHandle(operationHandle.toTOperationHandle()); resp.setStatus(OK_STATUS); } catch (Exception e) { @@ -633,6 +635,41 @@ public TFetchResultsResp FetchResults(TFetchResultsReq req) throws TException { return resp; } + @Override + public TGetPrimaryKeysResp GetPrimaryKeys(TGetPrimaryKeysReq req) + throws TException { + TGetPrimaryKeysResp resp = new TGetPrimaryKeysResp(); + try { + OperationHandle opHandle = cliService.getPrimaryKeys( + new SessionHandle(req.getSessionHandle()), req.getCatalogName(), + req.getSchemaName(), req.getTableName()); + resp.setOperationHandle(opHandle.toTOperationHandle()); + resp.setStatus(OK_STATUS); + } catch (Exception e) { + LOG.warn("Error getting functions: ", e); + resp.setStatus(HiveSQLException.toTStatus(e)); + } + return resp; + } + + @Override + public TGetCrossReferenceResp GetCrossReference(TGetCrossReferenceReq req) + throws TException { + TGetCrossReferenceResp resp = new TGetCrossReferenceResp(); + try { + OperationHandle opHandle = cliService.getCrossReference( + new SessionHandle(req.getSessionHandle()), req.getParentCatalogName(), + req.getParentSchemaName(), req.getParentTableName(), + req.getForeignCatalogName(), req.getForeignSchemaName(), req.getForeignTableName()); + resp.setOperationHandle(opHandle.toTOperationHandle()); + resp.setStatus(OK_STATUS); + } catch (Exception e) { + LOG.warn("Error getting functions: ", e); + resp.setStatus(HiveSQLException.toTStatus(e)); + } + return resp; + } + @Override public abstract void run(); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java index 1af45398b895c..b13ddf72f77e7 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftCLIServiceClient.java @@ -23,6 +23,7 @@ import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.cli.*; +import org.apache.hive.service.rpc.thrift.*; import org.apache.thrift.TException; /** @@ -113,9 +114,20 @@ public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType) */ @Override public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, - Map confOverlay) - throws HiveSQLException { - return executeStatementInternal(sessionHandle, statement, confOverlay, false); + Map confOverlay) throws HiveSQLException { + return executeStatementInternal(sessionHandle, statement, confOverlay, false, 0); + } + + @Override + public OperationHandle executeStatement(SessionHandle sessionHandle, String statement, + Map confOverlay, long queryTimeout) throws HiveSQLException { + return executeStatementInternal(sessionHandle, statement, confOverlay, false, queryTimeout); + } + + @Override + public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, + Map confOverlay) throws HiveSQLException { + return executeStatementInternal(sessionHandle, statement, confOverlay, true, 0); } /* (non-Javadoc) @@ -123,19 +135,18 @@ public OperationHandle executeStatement(SessionHandle sessionHandle, String stat */ @Override public OperationHandle executeStatementAsync(SessionHandle sessionHandle, String statement, - Map confOverlay) - throws HiveSQLException { - return executeStatementInternal(sessionHandle, statement, confOverlay, true); + Map confOverlay, long queryTimeout) throws HiveSQLException { + return executeStatementInternal(sessionHandle, statement, confOverlay, true, queryTimeout); } private OperationHandle executeStatementInternal(SessionHandle sessionHandle, String statement, - Map confOverlay, boolean isAsync) - throws HiveSQLException { + Map confOverlay, boolean isAsync, long queryTimeout) throws HiveSQLException { try { TExecuteStatementReq req = new TExecuteStatementReq(sessionHandle.toTSessionHandle(), statement); req.setConfOverlay(confOverlay); req.setRunAsync(isAsync); + req.setQueryTimeout(queryTimeout); TExecuteStatementResp resp = cliService.ExecuteStatement(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); @@ -437,4 +448,46 @@ public void renewDelegationToken(SessionHandle sessionHandle, HiveAuthFactory au throw new HiveSQLException(e); } } + + @Override + public OperationHandle getPrimaryKeys(SessionHandle sessionHandle, + String catalog, String schema, String table) throws HiveSQLException { + try { + TGetPrimaryKeysReq req = new TGetPrimaryKeysReq(sessionHandle.toTSessionHandle()); + req.setCatalogName(catalog); + req.setSchemaName(schema); + req.setTableName(table); + TGetPrimaryKeysResp resp = cliService.GetPrimaryKeys(req); + checkStatus(resp.getStatus()); + TProtocolVersion protocol = sessionHandle.getProtocolVersion(); + return new OperationHandle(resp.getOperationHandle(), protocol); + } catch (HiveSQLException e) { + throw e; + } catch (Exception e) { + throw new HiveSQLException(e); + } + } + + @Override + public OperationHandle getCrossReference(SessionHandle sessionHandle, + String primaryCatalog, String primarySchema, String primaryTable, + String foreignCatalog, String foreignSchema, String foreignTable) throws HiveSQLException { + try { + TGetCrossReferenceReq req = new TGetCrossReferenceReq(sessionHandle.toTSessionHandle()); + req.setParentCatalogName(primaryCatalog); + req.setParentSchemaName(primarySchema); + req.setParentTableName(primaryTable); + req.setForeignCatalogName(foreignCatalog); + req.setForeignSchemaName(foreignSchema); + req.setForeignTableName(foreignTable); + TGetCrossReferenceResp resp = cliService.GetCrossReference(req); + checkStatus(resp.getStatus()); + TProtocolVersion protocol = sessionHandle.getProtocolVersion(); + return new OperationHandle(resp.getOperationHandle(), protocol); + } catch (HiveSQLException e) { + throw e; + } catch (Exception e) { + throw new HiveSQLException(e); + } + } } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java index c3bcaf1e2d6c1..003898acf5986 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java @@ -30,7 +30,8 @@ import org.apache.hadoop.util.Shell; import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.cli.CLIService; -import org.apache.hive.service.cli.thrift.TCLIService.Iface; +import org.apache.hive.service.rpc.thrift.TCLIService; +import org.apache.hive.service.rpc.thrift.TCLIService.Iface; import org.apache.hive.service.server.ThreadFactoryWithGarbageCleanup; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TBinaryProtocol; @@ -129,7 +130,7 @@ public void run() { UserGroupInformation httpUGI = cliService.getHttpUGI(); String authType = hiveConf.getVar(ConfVars.HIVE_SERVER2_AUTHENTICATION); TServlet thriftHttpServlet = new ThriftHttpServlet(processor, protocolFactory, authType, - serviceUGI, httpUGI); + serviceUGI, httpUGI, hiveAuthFactory); // Context handler final ServletContextHandler context = new ServletContextHandler( @@ -144,12 +145,12 @@ public void run() { // Finally, start the server httpServer.start(); String msg = "Started " + ThriftHttpCLIService.class.getSimpleName() + " in " + schemeName - + " mode on port " + connector.getLocalPort()+ " path=" + httpPath + " with " + minWorkerThreads + "..." + + " mode on port " + portNum + " path=" + httpPath + " with " + minWorkerThreads + "..." + maxWorkerThreads + " worker threads"; LOG.info(msg); httpServer.join(); } catch (Throwable t) { - LOG.fatal( + LOG.error( "Error starting HiveServer2: could not start " + ThriftHttpCLIService.class.getSimpleName(), t); System.exit(-1); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java index e15d2d0566d2b..0cfa84d0971b3 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java @@ -34,21 +34,20 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.shims.HadoopShims.KerberosNameShim; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.security.UserGroupInformation; +import org.apache.hive.service.CookieSigner; import org.apache.hive.service.auth.AuthenticationProviderFactory; import org.apache.hive.service.auth.AuthenticationProviderFactory.AuthMethods; import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.auth.HttpAuthUtils; import org.apache.hive.service.auth.HttpAuthenticationException; import org.apache.hive.service.auth.PasswdAuthenticationProvider; +import org.apache.hive.service.cli.HiveSQLException; import org.apache.hive.service.cli.session.SessionManager; -import org.apache.hive.service.CookieSigner; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TProtocolFactory; import org.apache.thrift.server.TServlet; @@ -58,6 +57,8 @@ import org.ietf.jgss.GSSManager; import org.ietf.jgss.GSSName; import org.ietf.jgss.Oid; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -67,7 +68,7 @@ public class ThriftHttpServlet extends TServlet { private static final long serialVersionUID = 1L; - public static final Log LOG = LogFactory.getLog(ThriftHttpServlet.class.getName()); + public static final Logger LOG = LoggerFactory.getLogger(ThriftHttpServlet.class.getName()); private final String authType; private final UserGroupInformation serviceUGI; private final UserGroupInformation httpUGI; @@ -83,13 +84,17 @@ public class ThriftHttpServlet extends TServlet { private int cookieMaxAge; private boolean isCookieSecure; private boolean isHttpOnlyCookie; + private final HiveAuthFactory hiveAuthFactory; + private static final String HIVE_DELEGATION_TOKEN_HEADER = "X-Hive-Delegation-Token"; public ThriftHttpServlet(TProcessor processor, TProtocolFactory protocolFactory, - String authType, UserGroupInformation serviceUGI, UserGroupInformation httpUGI) { + String authType, UserGroupInformation serviceUGI, UserGroupInformation httpUGI, + HiveAuthFactory hiveAuthFactory) { super(processor, protocolFactory); this.authType = authType; this.serviceUGI = serviceUGI; this.httpUGI = httpUGI; + this.hiveAuthFactory = hiveAuthFactory; this.isCookieAuthEnabled = hiveConf.getBoolVar( ConfVars.HIVE_SERVER2_THRIFT_HTTP_COOKIE_AUTH_ENABLED); // Initialize the cookie based authentication related variables. @@ -132,7 +137,13 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) if (clientUserName == null) { // For a kerberos setup if (isKerberosAuthMode(authType)) { - clientUserName = doKerberosAuth(request); + String delegationToken = request.getHeader(HIVE_DELEGATION_TOKEN_HEADER); + // Each http request must have an Authorization header + if ((delegationToken != null) && (!delegationToken.isEmpty())) { + clientUserName = doTokenAuth(request, response); + } else { + clientUserName = doKerberosAuth(request); + } } // For password based authentication else { @@ -331,6 +342,16 @@ private String doPasswdAuth(HttpServletRequest request, String authType) return userName; } + private String doTokenAuth(HttpServletRequest request, HttpServletResponse response) + throws HttpAuthenticationException { + String tokenStr = request.getHeader(HIVE_DELEGATION_TOKEN_HEADER); + try { + return hiveAuthFactory.verifyDelegationToken(tokenStr); + } catch (HiveSQLException e) { + throw new HttpAuthenticationException(e); + } + } + /** * Do the GSS-API kerberos authentication. * We already have a logged in subject in the form of serviceUGI, diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/HiveServer2.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/HiveServer2.java index a30be2bc06b9e..ae74641ef6805 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/HiveServer2.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/HiveServer2.java @@ -29,18 +29,18 @@ import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.common.JvmPauseMonitor; import org.apache.hadoop.hive.common.LogUtils; import org.apache.hadoop.hive.common.LogUtils.LogInitializationException; import org.apache.hadoop.hive.conf.HiveConf; -import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hive.common.util.HiveStringUtils; import org.apache.hive.service.CompositeService; import org.apache.hive.service.cli.CLIService; import org.apache.hive.service.cli.thrift.ThriftBinaryCLIService; import org.apache.hive.service.cli.thrift.ThriftCLIService; import org.apache.hive.service.cli.thrift.ThriftHttpCLIService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.spark.util.ShutdownHookManager; @@ -49,7 +49,7 @@ * */ public class HiveServer2 extends CompositeService { - private static final Log LOG = LogFactory.getLog(HiveServer2.class); + private static final Logger LOG = LoggerFactory.getLogger(HiveServer2.class); private CLIService cliService; private ThriftCLIService thriftCLIService; @@ -124,7 +124,12 @@ private static void startHiveServer2() throws Throwable { server = new HiveServer2(); server.init(hiveConf); server.start(); - ShimLoader.getHadoopShims().startPauseMonitor(hiveConf); + try { + JvmPauseMonitor pauseMonitor = new JvmPauseMonitor(hiveConf); + pauseMonitor.start(); + } catch (Throwable t) { + LOG.warn("Could not initiate the JvmPauseMonitor thread.", t); + } break; } catch (Throwable throwable) { if (server != null) { @@ -283,7 +288,7 @@ public void execute() { try { startHiveServer2(); } catch (Throwable t) { - LOG.fatal("Error starting HiveServer2", t); + LOG.error("Error starting HiveServer2", t); System.exit(-1); } } diff --git a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java index 8ee98103f7ef7..9dd1c4d808edb 100644 --- a/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java +++ b/sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/server/ThreadWithGarbageCleanup.java @@ -21,10 +21,10 @@ import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.metastore.HiveMetaStore; import org.apache.hadoop.hive.metastore.RawStore; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A HiveServer2 thread used to construct new server threads. @@ -32,7 +32,7 @@ * when killed by its corresponding ExecutorService. */ public class ThreadWithGarbageCleanup extends Thread { - private static final Log LOG = LogFactory.getLog(ThreadWithGarbageCleanup.class); + private static final Logger LOG = LoggerFactory.getLogger(ThreadWithGarbageCleanup.class); Map threadRawStoreMap = ThreadFactoryWithGarbageCleanup.getThreadRawStoreMap(); diff --git a/sql/hive-thriftserver/v2.3.5/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala b/sql/hive-thriftserver/v2.3.5/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala new file mode 100644 index 0000000000000..9aca30caf696c --- /dev/null +++ b/sql/hive-thriftserver/v2.3.5/src/main/scala/org/apache/spark/sql/hive/thriftserver/ThriftserverShimUtils.scala @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.apache.spark.sql.hive.thriftserver + +import org.apache.hadoop.hive.ql.session.SessionState +import org.apache.hive.service.cli.{RowSet, RowSetFactory, TableSchema} +import org.slf4j.LoggerFactory + +/** + * Various utilities for hive-thriftserver used to upgrade the built-in Hive. + */ +private[thriftserver] object ThriftserverShimUtils { + + private[thriftserver] type TProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion + private[thriftserver] type Client = org.apache.hive.service.rpc.thrift.TCLIService.Client + private[thriftserver] type TOpenSessionReq = org.apache.hive.service.rpc.thrift.TOpenSessionReq + private[thriftserver] type TGetSchemasReq = org.apache.hive.service.rpc.thrift.TGetSchemasReq + private[thriftserver] type TGetTablesReq = org.apache.hive.service.rpc.thrift.TGetTablesReq + + private[thriftserver] def getConsole: SessionState.LogHelper = { + val LOG = LoggerFactory.getLogger(classOf[SparkSQLCLIDriver]) + new SessionState.LogHelper(LOG) + } + + private[thriftserver] def resultRowSet( + getResultSetSchema: TableSchema, + getProtocolVersion: TProtocolVersion): RowSet = { + RowSetFactory.create(getResultSetSchema, getProtocolVersion, false) + } + +}