1u0 opened a new pull request #8768: Flink 12143 fix fs dynamic class loading 
on create
URL: https://github.com/apache/flink/pull/8768
 
 
   ## What is the purpose of the change
   
   This PR adds a workaround for file system components that may involve 
dynamic class loading during `FileSystem` instantiation (via 
`FileSystemFactory.create()`) using plugins mechanism.
   The plugin's class loader is set as thread's context class loader during 
invocation of `FileSystemFactory.create()`.
   
   Note: an alternative approach could can be to set the plugin class loader 
inside of concrete file system component's `FileSystemFactory.create()` 
implementation.
   
   ## Brief change log
   
     - The `Plugin` interface is extended to provide the class loader used to 
load the plugin;
     - For non-fallback file system factory,  the `factory.careate()` call in 
`FileSystem` is wrapped with the plugin's class loader set as thread's one;
     - The end-to-end fs tests are reverted to use the plugin mechanism.
   
   
   ## Verifying this change
   
   This change is already covered by existing tests, such as 
`test_batch_wordcount.sh hadoop`
   and can be verified as follows:
   
     - by successfully running the `test_batch_wordcount.sh hadoop|dummy-fs` 
using the `lib` loading mechanism;
     - by successfully running the `test_batch_wordcount.sh hadoop|dummy-fs` 
using the plugins' loading mechanism.
   
   ## 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, 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**)
   

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