Hi,
I have the following pattern: public static void main(String[] args) { // Get the exec environment. This could be a cluster or a mini-cluster used for local development.Config.readProperties(); } class Config { private final static Logger LOGGER = LoggerFactory.getLogger(Config.class); // Populates variables above with values read from config file. } When I run this program as a minicluster, I am able to see the LOGGER.info() being printed in my console. However, when I submit this job as a JAR to a flink cluster, the Config class's LOGGER.info() line above is never printed in the taskmanager's logs! I don't understand why this is happening because log statements from other operators are definitely being printed in the log files on the cluster. What am I doing wrong? My log4j.properties file is: log4j.rootLogger=INFO, console, fileAppender Thank you, Manas Kale |
The main method is executed in the
JobManager process and never reaches the TaskExecutors (only the
individual functions do).
As such you have to take a peek into
the JobManager logs.
On 10/21/2020 11:37 AM, Manas Kale
wrote:
|
Hi Chesnay, I checked the JobManager logs - it's not there either. On Wed, Oct 21, 2020 at 3:51 PM Chesnay Schepler <[hidden email]> wrote:
|
Hold on, let us clarify how you submit
the job.
Do you upload the jar via the WebUI, or
with the CLI (e.g., ./bin/flink run ...)?
If it is the former, then it show up in
the JM logs.
If it is the latter, then it should
appear in the logs of the client (i.e.,
log/flink-???-client-???.log).
On 10/21/2020 2:17 PM, Manas Kale
wrote:
|
I see, thanks for that clarification - I incorrectly assumed both methods of submission produce logs in the same place. I will have an update tomorrow! On Wed, Oct 21, 2020 at 6:12 PM Chesnay Schepler <[hidden email]> wrote:
|
Thank you Chesnay. I found the logs being printed in the standalone session when I used CLI to submit the job. However this only deepens the mystery of the configuration file on the other thread - I see from the logs that the configuration values are being read correctly, but when these values are actually used, they are null! On Wed, Oct 21, 2020 at 7:58 PM Manas Kale <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |