Class SqlGatewayServiceImpl

java.lang.Object
org.apache.flink.table.gateway.service.SqlGatewayServiceImpl
All Implemented Interfaces:
org.apache.flink.table.gateway.api.SqlGatewayService

public class SqlGatewayServiceImpl extends Object implements org.apache.flink.table.gateway.api.SqlGatewayService
The implementation of the SqlGatewayService interface.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancelOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
     
    void
    closeOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
     
    void
    closeSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    completeStatement(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, int position)
     
    void
    configureSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, long executionTimeoutMs)
     
    <ClusterID>
    ClusterID
    deployScript(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, URI scriptUri, String script, org.apache.flink.configuration.Configuration executionConfig)
     
    org.apache.flink.table.gateway.api.operation.OperationHandle
    executeStatement(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, long executionTimeoutMs, org.apache.flink.configuration.Configuration executionConfig)
     
    org.apache.flink.table.gateway.api.results.ResultSet
    fetchResults(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle, long token, int maxRows)
     
    org.apache.flink.table.gateway.api.results.ResultSet
    fetchResults(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle, org.apache.flink.table.gateway.api.results.FetchOrientation orientation, int maxRows)
     
    getCurrentCatalog(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    org.apache.flink.table.functions.FunctionDefinition
    getFunctionDefinition(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.catalog.UnresolvedIdentifier functionIdentifier)
     
    org.apache.flink.table.gateway.api.results.GatewayInfo
     
    org.apache.flink.table.gateway.api.results.OperationInfo
    getOperationInfo(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
     
    org.apache.flink.table.catalog.ResolvedSchema
    getOperationResultSchema(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
     
    getSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    getSessionConfig(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    org.apache.flink.table.gateway.api.endpoint.EndpointVersion
    getSessionEndpointVersion(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>
    getTable(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.catalog.ObjectIdentifier tableIdentifier)
     
    listCatalogs(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    listDatabases(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName)
     
    Set<org.apache.flink.table.gateway.api.results.FunctionInfo>
    listSystemFunctions(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
     
    Set<org.apache.flink.table.gateway.api.results.TableInfo>
    listTables(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName, String databaseName, Set<org.apache.flink.table.catalog.CatalogBaseTable.TableKind> tableKinds)
     
    Set<org.apache.flink.table.gateway.api.results.FunctionInfo>
    listUserDefinedFunctions(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName, String databaseName)
     
    org.apache.flink.table.gateway.api.session.SessionHandle
    openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment environment)
     
    org.apache.flink.table.gateway.api.operation.OperationHandle
    refreshMaterializedTable(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String materializedTableIdentifier, boolean isPeriodic, String scheduleTime, Map<String,String> dynamicOptions, Map<String,String> staticPartitions, Map<String,String> executionConfig)
     
    org.apache.flink.table.gateway.api.operation.OperationHandle
    submitOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, Callable<org.apache.flink.table.gateway.api.results.ResultSet> executor)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SqlGatewayServiceImpl

      public SqlGatewayServiceImpl(SessionManager sessionManager)
  • Method Details

    • openSession

      public org.apache.flink.table.gateway.api.session.SessionHandle openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment environment) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      openSession in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • closeSession

      public void closeSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      closeSession in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • configureSession

      public void configureSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, long executionTimeoutMs) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      configureSession in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • getSessionConfig

      public Map<String,String> getSessionConfig(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      getSessionConfig in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • getSessionEndpointVersion

      public org.apache.flink.table.gateway.api.endpoint.EndpointVersion getSessionEndpointVersion(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      getSessionEndpointVersion in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • submitOperation

      public org.apache.flink.table.gateway.api.operation.OperationHandle submitOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, Callable<org.apache.flink.table.gateway.api.results.ResultSet> executor) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      submitOperation in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • cancelOperation

      public void cancelOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
      Specified by:
      cancelOperation in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • closeOperation

      public void closeOperation(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
      Specified by:
      closeOperation in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • getOperationInfo

      public org.apache.flink.table.gateway.api.results.OperationInfo getOperationInfo(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
      Specified by:
      getOperationInfo in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • getOperationResultSchema

      public org.apache.flink.table.catalog.ResolvedSchema getOperationResultSchema(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      getOperationResultSchema in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • executeStatement

      public org.apache.flink.table.gateway.api.operation.OperationHandle executeStatement(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, long executionTimeoutMs, org.apache.flink.configuration.Configuration executionConfig) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      executeStatement in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • fetchResults

      public org.apache.flink.table.gateway.api.results.ResultSet fetchResults(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle, long token, int maxRows) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      fetchResults in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • fetchResults

      public org.apache.flink.table.gateway.api.results.ResultSet fetchResults(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle, org.apache.flink.table.gateway.api.results.FetchOrientation orientation, int maxRows)
      Specified by:
      fetchResults in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • getCurrentCatalog

      public String getCurrentCatalog(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
      Specified by:
      getCurrentCatalog in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • listCatalogs

      public Set<String> listCatalogs(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      listCatalogs in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • listDatabases

      public Set<String> listDatabases(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName)
      Specified by:
      listDatabases in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • listTables

      public Set<org.apache.flink.table.gateway.api.results.TableInfo> listTables(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName, String databaseName, Set<org.apache.flink.table.catalog.CatalogBaseTable.TableKind> tableKinds)
      Specified by:
      listTables in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • getTable

      public org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> getTable(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.catalog.ObjectIdentifier tableIdentifier) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      getTable in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • refreshMaterializedTable

      public org.apache.flink.table.gateway.api.operation.OperationHandle refreshMaterializedTable(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String materializedTableIdentifier, boolean isPeriodic, @Nullable String scheduleTime, Map<String,String> dynamicOptions, Map<String,String> staticPartitions, Map<String,String> executionConfig)
      Specified by:
      refreshMaterializedTable in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • deployScript

      public <ClusterID> ClusterID deployScript(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, @Nullable URI scriptUri, @Nullable String script, org.apache.flink.configuration.Configuration executionConfig) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      deployScript in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • listUserDefinedFunctions

      public Set<org.apache.flink.table.gateway.api.results.FunctionInfo> listUserDefinedFunctions(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String catalogName, String databaseName) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      listUserDefinedFunctions in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • listSystemFunctions

      public Set<org.apache.flink.table.gateway.api.results.FunctionInfo> listSystemFunctions(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)
      Specified by:
      listSystemFunctions in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • getFunctionDefinition

      public org.apache.flink.table.functions.FunctionDefinition getFunctionDefinition(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, org.apache.flink.table.catalog.UnresolvedIdentifier functionIdentifier) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      getFunctionDefinition in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • getGatewayInfo

      public org.apache.flink.table.gateway.api.results.GatewayInfo getGatewayInfo()
      Specified by:
      getGatewayInfo in interface org.apache.flink.table.gateway.api.SqlGatewayService
    • completeStatement

      public List<String> completeStatement(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle, String statement, int position) throws org.apache.flink.table.gateway.api.utils.SqlGatewayException
      Specified by:
      completeStatement in interface org.apache.flink.table.gateway.api.SqlGatewayService
      Throws:
      org.apache.flink.table.gateway.api.utils.SqlGatewayException
    • getSession

      @VisibleForTesting public Session getSession(org.apache.flink.table.gateway.api.session.SessionHandle sessionHandle)