Class HiveServer2Endpoint

  • All Implemented Interfaces:
    Runnable, SqlGatewayEndpoint, org.apache.hive.service.rpc.thrift.TCLIService.Iface

    public class HiveServer2Endpoint
    extends Object
    implements org.apache.hive.service.rpc.thrift.TCLIService.Iface, SqlGatewayEndpoint, Runnable
    HiveServer2 Endpoint that allows to accept the request from the hive client, e.g. Hive JDBC, Hive Beeline.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.hive.service.rpc.thrift.TCancelDelegationTokenResp CancelDelegationToken​(org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq tCancelDelegationTokenReq)  
      org.apache.hive.service.rpc.thrift.TCancelOperationResp CancelOperation​(org.apache.hive.service.rpc.thrift.TCancelOperationReq tCancelOperationReq)  
      org.apache.hive.service.rpc.thrift.TCloseOperationResp CloseOperation​(org.apache.hive.service.rpc.thrift.TCloseOperationReq tCloseOperationReq)  
      org.apache.hive.service.rpc.thrift.TCloseSessionResp CloseSession​(org.apache.hive.service.rpc.thrift.TCloseSessionReq tCloseSessionReq)  
      boolean equals​(Object o)  
      org.apache.hive.service.rpc.thrift.TExecuteStatementResp ExecuteStatement​(org.apache.hive.service.rpc.thrift.TExecuteStatementReq tExecuteStatementReq)  
      org.apache.hive.service.rpc.thrift.TFetchResultsResp FetchResults​(org.apache.hive.service.rpc.thrift.TFetchResultsReq tFetchResultsReq)  
      org.apache.hive.service.rpc.thrift.TGetCatalogsResp GetCatalogs​(org.apache.hive.service.rpc.thrift.TGetCatalogsReq tGetCatalogsReq)  
      org.apache.hive.service.rpc.thrift.TGetColumnsResp GetColumns​(org.apache.hive.service.rpc.thrift.TGetColumnsReq tGetColumnsReq)  
      org.apache.hive.service.rpc.thrift.TGetCrossReferenceResp GetCrossReference​(org.apache.hive.service.rpc.thrift.TGetCrossReferenceReq tGetCrossReferenceReq)  
      org.apache.hive.service.rpc.thrift.TGetDelegationTokenResp GetDelegationToken​(org.apache.hive.service.rpc.thrift.TGetDelegationTokenReq tGetDelegationTokenReq)  
      org.apache.hive.service.rpc.thrift.TGetFunctionsResp GetFunctions​(org.apache.hive.service.rpc.thrift.TGetFunctionsReq tGetFunctionsReq)  
      org.apache.hive.service.rpc.thrift.TGetInfoResp GetInfo​(org.apache.hive.service.rpc.thrift.TGetInfoReq tGetInfoReq)  
      org.apache.hive.service.rpc.thrift.TGetOperationStatusResp GetOperationStatus​(org.apache.hive.service.rpc.thrift.TGetOperationStatusReq tGetOperationStatusReq)  
      org.apache.hive.service.rpc.thrift.TGetPrimaryKeysResp GetPrimaryKeys​(org.apache.hive.service.rpc.thrift.TGetPrimaryKeysReq tGetPrimaryKeysReq)  
      TGetQueryIdResp GetQueryId​(TGetQueryIdReq tGetQueryIdReq)
      To be compatible with Hive3, add a default implementation.
      org.apache.hive.service.rpc.thrift.TGetResultSetMetadataResp GetResultSetMetadata​(org.apache.hive.service.rpc.thrift.TGetResultSetMetadataReq tGetResultSetMetadataReq)  
      org.apache.hive.service.rpc.thrift.TGetSchemasResp GetSchemas​(org.apache.hive.service.rpc.thrift.TGetSchemasReq tGetSchemasReq)  
      org.apache.hive.service.rpc.thrift.TGetTablesResp GetTables​(org.apache.hive.service.rpc.thrift.TGetTablesReq tGetTablesReq)  
      org.apache.hive.service.rpc.thrift.TGetTableTypesResp GetTableTypes​(org.apache.hive.service.rpc.thrift.TGetTableTypesReq tGetTableTypesReq)  
      org.apache.hive.service.rpc.thrift.TGetTypeInfoResp GetTypeInfo​(org.apache.hive.service.rpc.thrift.TGetTypeInfoReq tGetTypeInfoReq)  
      int hashCode()  
      org.apache.hive.service.rpc.thrift.TOpenSessionResp OpenSession​(org.apache.hive.service.rpc.thrift.TOpenSessionReq tOpenSessionReq)  
      org.apache.hive.service.rpc.thrift.TRenewDelegationTokenResp RenewDelegationToken​(org.apache.hive.service.rpc.thrift.TRenewDelegationTokenReq tRenewDelegationTokenReq)  
      void run()  
      TSetClientInfoResp SetClientInfo​(TSetClientInfoReq tSetClientInfoReq)
      To be compatible with Hive3, add a default implementation.
      void start()
      Start the endpoint.
      void stop()
      Terminate the endpoint.
    • Constructor Detail

      • HiveServer2Endpoint

        public HiveServer2Endpoint​(SqlGatewayService service,
                                   InetSocketAddress socketAddress,
                                   long maxMessageSize,
                                   int requestTimeoutMs,
                                   int backOffSlotLengthMs,
                                   int minWorkerThreads,
                                   int maxWorkerThreads,
                                   Duration workerKeepAliveTime,
                                   String catalogName,
                                   HiveConf hiveConf,
                                   @Nullable
                                   String defaultDatabase,
                                   String moduleName)
    • Method Detail

      • OpenSession

        public org.apache.hive.service.rpc.thrift.TOpenSessionResp OpenSession​(org.apache.hive.service.rpc.thrift.TOpenSessionReq tOpenSessionReq)
                                                                        throws org.apache.thrift.TException
        Specified by:
        OpenSession in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • CloseSession

        public org.apache.hive.service.rpc.thrift.TCloseSessionResp CloseSession​(org.apache.hive.service.rpc.thrift.TCloseSessionReq tCloseSessionReq)
                                                                          throws org.apache.thrift.TException
        Specified by:
        CloseSession in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetInfo

        public org.apache.hive.service.rpc.thrift.TGetInfoResp GetInfo​(org.apache.hive.service.rpc.thrift.TGetInfoReq tGetInfoReq)
                                                                throws org.apache.thrift.TException
        Specified by:
        GetInfo in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • ExecuteStatement

        public org.apache.hive.service.rpc.thrift.TExecuteStatementResp ExecuteStatement​(org.apache.hive.service.rpc.thrift.TExecuteStatementReq tExecuteStatementReq)
                                                                                  throws org.apache.thrift.TException
        Specified by:
        ExecuteStatement in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetTypeInfo

        public org.apache.hive.service.rpc.thrift.TGetTypeInfoResp GetTypeInfo​(org.apache.hive.service.rpc.thrift.TGetTypeInfoReq tGetTypeInfoReq)
                                                                        throws org.apache.thrift.TException
        Specified by:
        GetTypeInfo in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetCatalogs

        public org.apache.hive.service.rpc.thrift.TGetCatalogsResp GetCatalogs​(org.apache.hive.service.rpc.thrift.TGetCatalogsReq tGetCatalogsReq)
                                                                        throws org.apache.thrift.TException
        Specified by:
        GetCatalogs in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetSchemas

        public org.apache.hive.service.rpc.thrift.TGetSchemasResp GetSchemas​(org.apache.hive.service.rpc.thrift.TGetSchemasReq tGetSchemasReq)
                                                                      throws org.apache.thrift.TException
        Specified by:
        GetSchemas in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetTables

        public org.apache.hive.service.rpc.thrift.TGetTablesResp GetTables​(org.apache.hive.service.rpc.thrift.TGetTablesReq tGetTablesReq)
                                                                    throws org.apache.thrift.TException
        Specified by:
        GetTables in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetTableTypes

        public org.apache.hive.service.rpc.thrift.TGetTableTypesResp GetTableTypes​(org.apache.hive.service.rpc.thrift.TGetTableTypesReq tGetTableTypesReq)
                                                                            throws org.apache.thrift.TException
        Specified by:
        GetTableTypes in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetColumns

        public org.apache.hive.service.rpc.thrift.TGetColumnsResp GetColumns​(org.apache.hive.service.rpc.thrift.TGetColumnsReq tGetColumnsReq)
                                                                      throws org.apache.thrift.TException
        Specified by:
        GetColumns in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetFunctions

        public org.apache.hive.service.rpc.thrift.TGetFunctionsResp GetFunctions​(org.apache.hive.service.rpc.thrift.TGetFunctionsReq tGetFunctionsReq)
                                                                          throws org.apache.thrift.TException
        Specified by:
        GetFunctions in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetPrimaryKeys

        public org.apache.hive.service.rpc.thrift.TGetPrimaryKeysResp GetPrimaryKeys​(org.apache.hive.service.rpc.thrift.TGetPrimaryKeysReq tGetPrimaryKeysReq)
                                                                              throws org.apache.thrift.TException
        Specified by:
        GetPrimaryKeys in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetCrossReference

        public org.apache.hive.service.rpc.thrift.TGetCrossReferenceResp GetCrossReference​(org.apache.hive.service.rpc.thrift.TGetCrossReferenceReq tGetCrossReferenceReq)
                                                                                    throws org.apache.thrift.TException
        Specified by:
        GetCrossReference in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetOperationStatus

        public org.apache.hive.service.rpc.thrift.TGetOperationStatusResp GetOperationStatus​(org.apache.hive.service.rpc.thrift.TGetOperationStatusReq tGetOperationStatusReq)
                                                                                      throws org.apache.thrift.TException
        Specified by:
        GetOperationStatus in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • CancelOperation

        public org.apache.hive.service.rpc.thrift.TCancelOperationResp CancelOperation​(org.apache.hive.service.rpc.thrift.TCancelOperationReq tCancelOperationReq)
                                                                                throws org.apache.thrift.TException
        Specified by:
        CancelOperation in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • CloseOperation

        public org.apache.hive.service.rpc.thrift.TCloseOperationResp CloseOperation​(org.apache.hive.service.rpc.thrift.TCloseOperationReq tCloseOperationReq)
                                                                              throws org.apache.thrift.TException
        Specified by:
        CloseOperation in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetResultSetMetadata

        public org.apache.hive.service.rpc.thrift.TGetResultSetMetadataResp GetResultSetMetadata​(org.apache.hive.service.rpc.thrift.TGetResultSetMetadataReq tGetResultSetMetadataReq)
                                                                                          throws org.apache.thrift.TException
        Specified by:
        GetResultSetMetadata in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • FetchResults

        public org.apache.hive.service.rpc.thrift.TFetchResultsResp FetchResults​(org.apache.hive.service.rpc.thrift.TFetchResultsReq tFetchResultsReq)
                                                                          throws org.apache.thrift.TException
        Specified by:
        FetchResults in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetDelegationToken

        public org.apache.hive.service.rpc.thrift.TGetDelegationTokenResp GetDelegationToken​(org.apache.hive.service.rpc.thrift.TGetDelegationTokenReq tGetDelegationTokenReq)
                                                                                      throws org.apache.thrift.TException
        Specified by:
        GetDelegationToken in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • CancelDelegationToken

        public org.apache.hive.service.rpc.thrift.TCancelDelegationTokenResp CancelDelegationToken​(org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq tCancelDelegationTokenReq)
                                                                                            throws org.apache.thrift.TException
        Specified by:
        CancelDelegationToken in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • RenewDelegationToken

        public org.apache.hive.service.rpc.thrift.TRenewDelegationTokenResp RenewDelegationToken​(org.apache.hive.service.rpc.thrift.TRenewDelegationTokenReq tRenewDelegationTokenReq)
                                                                                          throws org.apache.thrift.TException
        Specified by:
        RenewDelegationToken in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • GetQueryId

        public TGetQueryIdResp GetQueryId​(TGetQueryIdReq tGetQueryIdReq)
                                   throws org.apache.thrift.TException
        To be compatible with Hive3, add a default implementation.
        Specified by:
        GetQueryId in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • SetClientInfo

        public TSetClientInfoResp SetClientInfo​(TSetClientInfoReq tSetClientInfoReq)
                                         throws org.apache.thrift.TException
        To be compatible with Hive3, add a default implementation.
        Specified by:
        SetClientInfo in interface org.apache.hive.service.rpc.thrift.TCLIService.Iface
        Throws:
        org.apache.thrift.TException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • run

        public void run()
        Specified by:
        run in interface Runnable