You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Jonathan Eagles (JIRA)" <ji...@apache.org> on 2019/03/05 16:24:00 UTC

[jira] [Commented] (TEZ-4039) Tez should inject dag id, query id into MDC

    [ https://issues.apache.org/jira/browse/TEZ-4039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16784618#comment-16784618 ] 

Jonathan Eagles commented on TEZ-4039:
--------------------------------------

[~prasanth_j], I can quickly see how usefully this will be. Directly, I see how dagId is relevant, but queryId has no meaning in tez. What does that represent and does that have to be done explicitly, or is setting MDC based on NDC enough (hive sets NDC and then Tez copied NDC to MDC)? Also, is log4j2 required for this functionality?

> Tez should inject dag id, query id into MDC
> -------------------------------------------
>
>                 Key: TEZ-4039
>                 URL: https://issues.apache.org/jira/browse/TEZ-4039
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.9.next
>            Reporter: Prasanth Jayachandran
>            Priority: Major
>
> Tez currently uses CallableWithNdc to store thread specific context. It should also inject the context into MDC so that pattern layout can dump the contexts from MDC (with NDC it is not possible to read the context in pattern lyaout).
> Hive for example, sets queryId in the MDC and pattern layout prints the queryId
>  
> {code:java}
> %d{ISO8601} %-5p [%t (%X{queryId})] %c{2}: %m%n
> {code}
> Llap sets dagId, fragmentId and queryId into MDC which is used for queryId based routing of logging.
> Similarly, Tez AM should set dagId and queryId (if available) into MDC. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)