You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tez.apache.org by GitBox <gi...@apache.org> on 2021/02/06 14:06:02 UTC

[GitHub] [tez] abstractdog commented on a change in pull request #98: TEZ-4039: Tez should inject dag id, query id into MDC

abstractdog commented on a change in pull request #98:
URL: https://github.com/apache/tez/pull/98#discussion_r571439389



##########
File path: tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
##########
@@ -248,6 +248,42 @@ public TezConfiguration(boolean loadDefaults) {
   public static final String TEZ_TASK_LOG_LEVEL = TEZ_TASK_PREFIX + "log.level";
   public static final String TEZ_TASK_LOG_LEVEL_DEFAULT = "INFO";
 
+  /**
+   * By this option, user can easily override the logging pattern which is applied in
+   * TezContainerLogAppender in AM, regardless of the environmental settings.
+   */
+  @ConfigurationScope(Scope.AM)
+  @ConfigurationProperty
+  public static final String TEZ_LOG_PATTERN_LAYOUT_AM = TEZ_PREFIX + "log.pattern.layout.am";
+
+  /**
+   * By this option, user can easily override the logging pattern which is applied in
+   * TezContainerLogAppender in tasks, regardless of the environmental settings.
+   */
+  @ConfigurationScope(Scope.AM)
+  @ConfigurationProperty
+  public static final String TEZ_LOG_PATTERN_LAYOUT_TASK = TEZ_PREFIX + "log.pattern.layout.task";
+
+  /**
+   * Comma separated list of keys, which can used for defining keys in MDC. The corresponding values
+   * will be read from Configuration, see tez.mdc.custom.keys.values.from for further details.
+   */
+  @ConfigurationScope(Scope.AM)
+  @ConfigurationProperty
+  public static final String TEZ_MDC_CUSTOM_KEYS = TEZ_PREFIX + "mdc.custom.keys";
+  public static final String TEZ_MDC_CUSTOM_KEYS_DEFAULT = "";
+
+  /**
+   * Comma separated list of keys, which can used for defining keys in Configuration. Tez will try

Review comment:
       no, these are still keys, but keys in Configuration
   ```
   tez.mdc.custom.keys=queryId
   tez.mdc.custom.keys.values.from=hive.query.id <- here we are
   ```
   I'm trying to clarify this in javadoc




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