You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/18 09:41:26 UTC

[GitHub] [flink] StephanEwen opened a new pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

StephanEwen opened a new pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120
 
 
   ## What is the purpose of the change
   
   These two classes do basically same thing, this PR unifies the use to a consolidated implementation.
   
   The consolidated implementation
     - Resides in `org.apache.flink.util` (not in the plugins sub-package) because it is intended as a general util
     - Is called `TemporaryClassLoaderContext` (better name)
     - Uses `TemporaryClassLoaderContext.of(classLoader)` pattern from the `AutoContextClassLoader`. This pattern is more in line with the "don't do work in the constructor" coding guide. This also makes it more future-proof, in case we need to do extended handling in the future for specific classloaders (child-first, plugins) or more elaborate handling of thread local variables, etc.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] StephanEwen commented on a change in pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
StephanEwen commented on a change in pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#discussion_r380777929
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/TemporaryClassLoaderContext.java
 ##########
 @@ -43,7 +45,8 @@
  * }
  * </pre>
  */
-public final class AutoContextClassLoader implements AutoCloseable {
+@Public
 
 Review comment:
   Not sure. I thought it was a simple enough utility such that it would not hurt to expose it, but we can also conservatively start with `@Internal`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] StephanEwen commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
StephanEwen commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587546549
 
 
   Will change the `@Public` to `@Internal` for now and merge this, unless there are further objections.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587382267
 
 
   <!--
   Meta data
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/149419268 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:d809478e501cace5709b7b988e76b2ef42aa132c Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:d809478e501cace5709b7b988e76b2ef42aa132c
   -->
   ## CI report:
   
   * ea8fa29bd56118f9294cc578bb51340b88ceaf70 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/149419268) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269) 
   * d809478e501cace5709b7b988e76b2ef42aa132c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587382267
 
 
   <!--
   Meta data
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/149419268 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:d809478e501cace5709b7b988e76b2ef42aa132c Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/149425208 TriggerType:PUSH TriggerID:d809478e501cace5709b7b988e76b2ef42aa132c
   -->
   ## CI report:
   
   * ea8fa29bd56118f9294cc578bb51340b88ceaf70 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/149419268) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269) 
   * d809478e501cace5709b7b988e76b2ef42aa132c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149425208) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] zentol commented on a change in pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#discussion_r380602581
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/TemporaryClassLoaderContext.java
 ##########
 @@ -43,7 +45,8 @@
  * }
  * </pre>
  */
-public final class AutoContextClassLoader implements AutoCloseable {
+@Public
 
 Review comment:
   Why `@Public`? Do we actually expect users to use this?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] StephanEwen closed pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
StephanEwen closed pull request #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587382267
 
 
   <!--
   Meta data
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   -->
   ## CI report:
   
   * ea8fa29bd56118f9294cc578bb51340b88ceaf70 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587369912
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit ea8fa29bd56118f9294cc578bb51340b88ceaf70 (Tue Feb 18 09:43:53 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11120: [FLINK-16135][core] Unify the TemporaryClassLoaderContext and AutoContextClassLoader
URL: https://github.com/apache/flink/pull/11120#issuecomment-587382267
 
 
   <!--
   Meta data
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:ea8fa29bd56118f9294cc578bb51340b88ceaf70 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/149419268 TriggerType:PUSH TriggerID:ea8fa29bd56118f9294cc578bb51340b88ceaf70
   Hash:d809478e501cace5709b7b988e76b2ef42aa132c Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/149425208 TriggerType:PUSH TriggerID:d809478e501cace5709b7b988e76b2ef42aa132c
   -->
   ## CI report:
   
   * ea8fa29bd56118f9294cc578bb51340b88ceaf70 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/149419268) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5269) 
   * d809478e501cace5709b7b988e76b2ef42aa132c Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/149425208) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services