LadyForest opened a new pull request #14938:
URL: https://github.com/apache/flink/pull/14938


   ## What is the purpose of the change
   
   Simplify the module factory discovery and mapping modules purely by module's 
name. This implies  
   
   1. Deprecate and remove the redundant 'type' from the 
`sql-client-defaults.yaml` configuration.
   - Before
    ```yaml
   modules:
     - name: core
       type: core
     - name: hive
       type: hive
    ```
   - After
    ```yaml
   modules:
     - name: core
     - name: hive
    ```
   2. The module's name is case-sensitive and needs to be equal to the module's 
type, which is defined in the `ModuleFactory` impl or `ModuleDescriptor` impl.
   - Before
    ```yaml
   modules:
     - name: mymodule
       type: ModuleDependencyTest
       test: test
    ```
   - After    
   ```yaml
   modules:
     - name: ModuleDependencyTest
       test: test 
    ```
   3. The framework will now explicitly prevent loading parameterized modules 
with different parameters at the same time.
       
   - Before
    ```yaml
   modules:
     - name: myhive
       type: hive
     - name: myhive2
       type: hive
       hive-version: 2.3.4
    ```
   - After   
   ```yaml
   modules:
     - name: hive
    ```
   or
   ```yaml
   modules:
     - name: hive
       hive-version: 2.3.4 
    ```
   These two cannot present at the same time. 
   
   ## Brief change log
   
     - Add module name as the type to `DescriptorProperties` in `ModuleEntry` 
implicitly
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - Add tests in `EnvironmentTest` to verify loading modules without type 
and module name's case sensitivity.
     - Add tests in `ExecutionContextTest` to verify the YAML configuration 
before and after this PR behaves correctly.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** 
/ don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / 
don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**yes** / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs 
/ **not documented**)
       - Docs will be updated after FLINK-21300 finish.
   


----------------------------------------------------------------
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]


Reply via email to