When I submit a job in JobManager, I need to read a path /file-path. This path should be read from TaskManager, but I actually read /file-path from the submitted machine JobManager, if I want to submit in the JobManager containerHomework, then read the file on the taskmanager, what should I do?
CodePudding user response:
Depending on how a Flink job is submitted, the code in its main
method is executed either in the client or in the Job Manager. If you want something to be executed in each Task Manager during initialization, put that code into the open
method of one of your functions.