Class SqlGatewayRestEndpoint
- java.lang.Object
-
- org.apache.flink.runtime.rest.RestServerEndpoint
-
- org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,RestService
,SqlGatewayEndpoint
,AutoCloseableAsync
public class SqlGatewayRestEndpoint extends RestServerEndpoint implements SqlGatewayEndpoint
The rest endpoint for sql gateway.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
RestServerEndpoint.RestHandlerUrlComparator
-
-
Field Summary
Fields Modifier and Type Field Description SqlGatewayService
service
-
Fields inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
log, responseHeaders, uploadDir
-
-
Constructor Summary
Constructors Constructor Description SqlGatewayRestEndpoint(Configuration configuration, SqlGatewayService sqlGatewayService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addOperationRelatedHandlers(List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> handlers)
protected void
addUtilRelatedHandlers(List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> handlers)
EmbeddedQuartzScheduler
getQuartzScheduler()
protected List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>>
initializeHandlers(CompletableFuture<String> localAddressFuture)
This method is called at the beginning ofRestServerEndpoint.start()
to setup all handlers that the REST server endpoint implementation requires.protected void
startInternal()
Hook to start sub class specific services.void
stop()
Terminate the endpoint.-
Methods inherited from class org.apache.flink.runtime.rest.RestServerEndpoint
closeAsync, getRestBaseUrl, getRestPort, getServerAddress, shutDownInternal, start
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.util.AutoCloseableAsync
close
-
Methods inherited from interface org.apache.flink.table.gateway.api.endpoint.SqlGatewayEndpoint
start
-
-
-
-
Field Detail
-
service
public final SqlGatewayService service
-
-
Constructor Detail
-
SqlGatewayRestEndpoint
public SqlGatewayRestEndpoint(Configuration configuration, SqlGatewayService sqlGatewayService) throws IOException, ConfigurationException
- Throws:
IOException
ConfigurationException
-
-
Method Detail
-
getQuartzScheduler
@VisibleForTesting public EmbeddedQuartzScheduler getQuartzScheduler()
-
initializeHandlers
protected List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> initializeHandlers(CompletableFuture<String> localAddressFuture)
Description copied from class:RestServerEndpoint
This method is called at the beginning ofRestServerEndpoint.start()
to setup all handlers that the REST server endpoint implementation requires.- Specified by:
initializeHandlers
in classRestServerEndpoint
- Parameters:
localAddressFuture
- future rest address of the RestServerEndpoint- Returns:
- Collection of AbstractRestHandler which are added to the server endpoint
-
addOperationRelatedHandlers
protected void addOperationRelatedHandlers(List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> handlers)
-
addUtilRelatedHandlers
protected void addUtilRelatedHandlers(List<Tuple2<RestHandlerSpecification,org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler>> handlers)
-
startInternal
protected void startInternal()
Description copied from class:RestServerEndpoint
Hook to start sub class specific services.- Specified by:
startInternal
in classRestServerEndpoint
-
stop
public void stop() throws Exception
Description copied from interface:SqlGatewayEndpoint
Terminate the endpoint.- Specified by:
stop
in interfaceSqlGatewayEndpoint
- Throws:
Exception
-
-