This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 9cf4c48945f10db074854828d92ca70280ef23ab Author: Chesnay Schepler <[email protected]> AuthorDate: Mon Jul 5 10:56:34 2021 +0200 [hotfix] Extract logging parent-first patterns into constant --- docs/layouts/shortcodes/generated/core_configuration.html | 2 +- .../shortcodes/generated/expert_class_loading_section.html | 2 +- .../java/org/apache/flink/configuration/CoreOptions.java | 12 +++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/layouts/shortcodes/generated/core_configuration.html b/docs/layouts/shortcodes/generated/core_configuration.html index bf00ecd..43ec684 100644 --- a/docs/layouts/shortcodes/generated/core_configuration.html +++ b/docs/layouts/shortcodes/generated/core_configuration.html @@ -30,7 +30,7 @@ This check should only be disabled if such a leak prevents further jobs from run </tr> <tr> <td><h5>classloader.parent-first-patterns.default</h5></td> - <td style="word-wrap: break-word;">"java.;<wbr>scala.;<wbr>org.apache.flink.;<wbr>com.esotericsoftware.kryo;<wbr>org.apache.hadoop.;<wbr>javax.annotation.;<wbr>org.slf4j;<wbr>org.apache.log4j;<wbr>org.apache.logging;<wbr>org.apache.commons.logging;<wbr>ch.qos.logback;<wbr>org.xml;<wbr>javax.xml;<wbr>org.apache.xerces;<wbr>org.w3c"</td> + <td style="word-wrap: break-word;">"java.;<wbr>scala.;<wbr>org.apache.flink.;<wbr>com.esotericsoftware.kryo;<wbr>org.apache.hadoop.;<wbr>javax.annotation.;<wbr>org.xml;<wbr>javax.xml;<wbr>org.apache.xerces;<wbr>org.w3c;<wbr>org.slf4j;<wbr>org.apache.log4j;<wbr>org.apache.logging;<wbr>org.apache.commons.logging;<wbr>ch.qos.logback"</td> <td>String</td> <td>A (semicolon-separated) list of patterns that specifies which classes should always be resolved through the parent ClassLoader first. A pattern is a simple prefix that is checked against the fully qualified class name. This setting should generally not be modified. To add another pattern we recommend to use "classloader.parent-first-patterns.additional" instead.</td> </tr> diff --git a/docs/layouts/shortcodes/generated/expert_class_loading_section.html b/docs/layouts/shortcodes/generated/expert_class_loading_section.html index a4236f1..c88ac73 100644 --- a/docs/layouts/shortcodes/generated/expert_class_loading_section.html +++ b/docs/layouts/shortcodes/generated/expert_class_loading_section.html @@ -30,7 +30,7 @@ This check should only be disabled if such a leak prevents further jobs from run </tr> <tr> <td><h5>classloader.parent-first-patterns.default</h5></td> - <td style="word-wrap: break-word;">"java.;<wbr>scala.;<wbr>org.apache.flink.;<wbr>com.esotericsoftware.kryo;<wbr>org.apache.hadoop.;<wbr>javax.annotation.;<wbr>org.slf4j;<wbr>org.apache.log4j;<wbr>org.apache.logging;<wbr>org.apache.commons.logging;<wbr>ch.qos.logback;<wbr>org.xml;<wbr>javax.xml;<wbr>org.apache.xerces;<wbr>org.w3c"</td> + <td style="word-wrap: break-word;">"java.;<wbr>scala.;<wbr>org.apache.flink.;<wbr>com.esotericsoftware.kryo;<wbr>org.apache.hadoop.;<wbr>javax.annotation.;<wbr>org.xml;<wbr>javax.xml;<wbr>org.apache.xerces;<wbr>org.w3c;<wbr>org.slf4j;<wbr>org.apache.log4j;<wbr>org.apache.logging;<wbr>org.apache.commons.logging;<wbr>ch.qos.logback"</td> <td>String</td> <td>A (semicolon-separated) list of patterns that specifies which classes should always be resolved through the parent ClassLoader first. A pattern is a simple prefix that is checked against the fully qualified class name. This setting should generally not be modified. To add another pattern we recommend to use "classloader.parent-first-patterns.additional" instead.</td> </tr> diff --git a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java index 7fde49a..db21d21 100644 --- a/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java +++ b/flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java @@ -18,6 +18,7 @@ package org.apache.flink.configuration; +import org.apache.flink.annotation.Internal; import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.annotation.docs.ConfigGroup; import org.apache.flink.annotation.docs.ConfigGroups; @@ -34,6 +35,10 @@ import static org.apache.flink.configuration.ConfigOptions.key; @ConfigGroups(groups = {@ConfigGroup(name = "Environment", keyPrefix = "env")}) public class CoreOptions { + @Internal + public static final String PARENT_FIRST_LOGGING_PATTERNS = + "org.slf4j;org.apache.log4j;org.apache.logging;org.apache.commons.logging;ch.qos.logback"; + // ------------------------------------------------------------------------ // Classloading Parameters // ------------------------------------------------------------------------ @@ -92,7 +97,8 @@ public class CoreOptions { public static final ConfigOption<String> ALWAYS_PARENT_FIRST_LOADER_PATTERNS = ConfigOptions.key("classloader.parent-first-patterns.default") .defaultValue( - "java.;scala.;org.apache.flink.;com.esotericsoftware.kryo;org.apache.hadoop.;javax.annotation.;org.slf4j;org.apache.log4j;org.apache.logging;org.apache.commons.logging;ch.qos.logback;org.xml;javax.xml;org.apache.xerces;org.w3c") + "java.;scala.;org.apache.flink.;com.esotericsoftware.kryo;org.apache.hadoop.;javax.annotation.;org.xml;javax.xml;org.apache.xerces;org.w3c;" + + PARENT_FIRST_LOGGING_PATTERNS) .withDeprecatedKeys("classloader.parent-first-patterns") .withDescription( "A (semicolon-separated) list of patterns that specifies which classes should always be" @@ -149,8 +155,8 @@ public class CoreOptions { ConfigOptions.key("plugin.classloader.parent-first-patterns.default") .stringType() .defaultValue( - "java.;org.apache.flink.;javax.annotation.;org.slf4j;org.apache.log4j;org.apache" - + ".logging;org.apache.commons.logging;ch.qos.logback") + "java.;org.apache.flink.;javax.annotation.;" + + PARENT_FIRST_LOGGING_PATTERNS) .withDescription( "A (semicolon-separated) list of patterns that specifies which classes should always be" + " resolved through the plugin parent ClassLoader first. A pattern is a simple prefix that is checked "
