Per the discussion in the ML, the detail can be found , the teardown of DoFns should be supported in the portability framework. It happens at two places:
1) Upon the control service termination
2) Tear down the unused DoFns periodically
The aim of this JIRA is to add support for teardown the DoFns upon the control service termination in Java SDK harness.