[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-29 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-621606974


   @Ngone51  To clarify:
   We have one single long-running spark application to which we continuously 
submit jobs which are non-related to one another.
   These jobs may be consecutive or run in parallel and we need to enhance our 
logs with job/context specific information for which Spark is logging so that 
we can easier troubleshoot from a single log file. 
   At a later stage, we also use this information for splitting the logs and 
handle each job execution information.
   
   
   



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-29 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-621590368


   we are running one-app but submit to it many tasks using spark-server so it 
has many tasks that belong to different requests. so in our case, we mostly use 
the `mdc.`  local property. to add info into logs.
and from the original Jira:
   
   > It would be nice to have, because it's good to have logs in one file when 
using log agents (like logentires) in standalone mode. Also allows configuring 
rolling file appender without a mess when multiple applications are running.



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-29 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-621358014


   Hi @cloud-fan, I think that if we will not merge all as part it will not 
have the benefit. as I answer in an earlier 
[comment](https://github.com/apache/spark/pull/26624#issuecomment-619949637)



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-28 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-620989210


   @ngone51 can you help understand what went wrong in the build? 



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-28 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-620460159


   The failed test does not seems to be connected to the changes in the code 



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-27 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-619976944


   log4j.appender.console.layout.ConversionPattern=%d{/MM/dd HH:mm:ss} %p 
[%X{appId}] [%X{appName}] %c{3} - %m%n
   ```
   properties.asScala.filter(_._1.startsWith("mdc.")).foreach { item =>
 val key = item._1.substring(4)
 org.slf4j.MDC.put(key, item._2)
   }
   ```
   
   in that code you iterate over the properties and add each property that 
start with mdc it adds to MDC so you can use.
   
   we are using spark under spark server so we have long-running sessions and 
many tasks in it that do not connect to each other. and we add properties so we 
can see in the logs which connected to which.
   



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-27 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-619949637


   Hi, @Ngone51 first thank for reviewing!
   about the pattern, it should be added but I think each will add what he 
needed and how he wanted it as it also supports adding local properties 
starting with MDC.  
   about `ThreadUtils` without all that change the MDC will not propagate to 
all places only to the scope of that thread and from my tests it is not enough, 
we are using that code internally for more than a year.



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] igreenfield commented on pull request #26624: [SPARK-8981][core] Add MDC support in Executor

2020-04-26 Thread GitBox


igreenfield commented on pull request #26624:
URL: https://github.com/apache/spark/pull/26624#issuecomment-619526963


   @cloud-fan Could you please look at that?



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



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org