openinx opened a new pull request #10270: [FLINK-14672][sql-client] Make 
Executor stateful in sql client
URL: https://github.com/apache/flink/pull/10270
 
 
   ## What is the purpose of the change
   
   Now we only have the embedded mode SQL to interact with Flink cluster, will 
support the multi-statement and DDL such create table, which means we need to 
store some state for the same session. On the other hande, it will support the 
gateway mode in future, means it will maitain multi-sessions at the server 
side. 
   
   So it's necessary to be stateful for the Executor (both LocalExecutor and 
GatewayExecutor). 
   
   
   The pull request provide two extra API in Executor interface to manage 
session life-cycle:  
   1. String openSession(SessionContext context);  it will create a new session 
based on the passed session context, the session will have the 
ExecutionContext/TableEnviroment/UDF informations (etc).  and the openSession 
will return a uuid string which represent the session identification, the 
following operations of this session will attach the sessionId to request the 
Executor (both local and gateway). 
   2. String closeSession(String sessionId);   it will close the session(clear 
the session related resources) with given session identify.
   
   For each session, we will openSesion firstly, then execute some DDL or DML, 
and closeSession finally. When executing the DDL or DML, it will share the same 
session context and execution context for the same session identifier.
   
   ## Brief change log
   
   - 4b5c6f4491 [FLINK-14672][sql-client] Make Executor stateful in sql client  
   
   ## Verifying this change
   
   The LocalExecutorITCase addressed all the cases.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not documented)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to