Hi what is the recommended way to update log level...
# troubleshooting
a
Hi what is the recommended way to update log level dynamically in a running flink app on EMR?
d
Use the Rest API e.g.
Copy code
curl -X POST \
     -H "Content-Type: application/json" \
     -d '{"logLevel": "DEBUG"}' \
     http://<master-node-ip>:8081/jobs/job_123456789/vertices/vertex_987654321/log
gratitude thank you 1
a
Interesting. I guess I would need some way to list all vertices of a running job. Also is there a way to specify package names where log level is changed?
d
Use the Flink Web UI to find it.
You can inspect the job graph there and find it I think
I think you use EMR master cluster node the access Flink Web UI & Rest API
a
Hmm I am avoiding using the Web UI because this needs to be like a simple script which we can run to enable logs dynamically when there is an issue. Since we have a lot of task managers doing it via Web UI may not be the best approach for us.
d
Rest API is I’m sure what Web UI uses under the hood.
You can just use Rest API for everything
a
Ahh ok. So maybe I can try that. Thanks!
d
Sure! Good luck!