We are having a java application which uses apache beam. This is run using flink runner in AWS. After running the application, I want to update the database table. We start the batch process from lambda and I want the hook when the application is complete. I want to update the database based on that.
- I used Runtime.getRuntime().addShutdownHook. The thread in this is not run in AWS.
- I used a while(true) to do it myself. Even this was blocked in AWS and the code did not run.
Please let me know how this can be achieved.