You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tang Yan (JIRA)" <ji...@apache.org> on 2019/04/22 07:12:00 UTC

[jira] [Updated] (FLINK-12286) The default log4j.properties will overwrite the customized log4j property file.

     [ https://issues.apache.org/jira/browse/FLINK-12286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tang Yan updated FLINK-12286:
-----------------------------
    Description: 
This is my run command:

bin/flink run -m yarn-cluster -yD env.java.opts="-Dlog4j.configuration=[file:/mypath/to/log4j-flink.properties|file:///mypath/to/log4j-flink.properties]"  ./examples/batch/WordCount.jar  --input path1 --output path2

Result: The job still used the default log4j.properties in conf folder. 

From the below logs, it seems the job launched customized configuration firstly, and then the default property file just overwrite it.

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM Options:

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Xmx2304m

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=[file:/mypath/to/log4j-flink.properties|file:///mypath/to/log4j-flink.properties]

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog.file=/data/yarn/container-logs/application_1555610668906_0067/container_e193_1555610668906_0067_01_000001/jobmanager.log 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=[file:log4j.properties|file:///log4j.properties]

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Program Arguments: (none) 2019

  was:
This is my run command:

bin/flink run -m yarn-cluster -yD env.java.opts="-Dlog4j.configuration=file:/mypath/to/log4j-flink.properties"  ./examples/batch/WordCount.jar  --input path1 --output path2

Result: The job still used the default log4j.properties in conf folder. 

From the below logs, it seems the job launched customized configuration firstly, and then the default property file just overwrite it.

2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM Options: 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Xmx2304m 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=file:/mypath/to/log4j-flink.properties 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog.file=/data/yarn/container-logs/application_1555610668906_0067/container_e193_1555610668906_0067_01_000001/jobmanager.log 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=file:log4j.properties 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Program Arguments: (none) 2019


> The default log4j.properties will overwrite the customized log4j property file.
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-12286
>                 URL: https://issues.apache.org/jira/browse/FLINK-12286
>             Project: Flink
>          Issue Type: Bug
>          Components: flink-contrib
>    Affects Versions: 1.7.2
>            Reporter: Tang Yan
>            Priority: Critical
>
> This is my run command:
> bin/flink run -m yarn-cluster -yD env.java.opts="-Dlog4j.configuration=[file:/mypath/to/log4j-flink.properties|file:///mypath/to/log4j-flink.properties]"  ./examples/batch/WordCount.jar  --input path1 --output path2
> Result: The job still used the default log4j.properties in conf folder. 
> From the below logs, it seems the job launched customized configuration firstly, and then the default property file just overwrite it.
> 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM Options:
> 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Xmx2304m
> 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=[file:/mypath/to/log4j-flink.properties|file:///mypath/to/log4j-flink.properties]
> 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog.file=/data/yarn/container-logs/application_1555610668906_0067/container_e193_1555610668906_0067_01_000001/jobmanager.log 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=[file:log4j.properties|file:///log4j.properties]
> 2019-04-22 06:57:33,436 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Program Arguments: (none) 2019



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