lamber-ken edited a comment on issue #8254: [FLINK-12219][runtime] Yarn 
application can't stop when flink job failed in per-job yarn cluste mode
URL: https://github.com/apache/flink/pull/8254#issuecomment-487131615
 
 
   > Hi @lamber-ken, I think the inner `Exception` is not a problem because it 
is actually only a `IOException`. Thus, the `archiveJob` method can only throw 
an `IOException`.
   > 
   > The NPE is clearly a Flink bug and as such we should rather fix the bug 
than guard against it. What we could do, though, is to run 
`jobTerminationFuture.complete(ApplicationStatus.fromJobStatus(archivedExecutionGraph.getState()));`
 in a `finally` block. But we should not catch the exception there. Per 
contract `jobReachedGloballyTerminalState` should not throw any exception. If 
it does, then it violates the contract and Flink gives no guarantees how it 
behaves afterwards.
   
   Hi, @tillrohrmann, thanks for you explain and agree with your point. 
   I had move 
`jobTerminationFuture.complete(ApplicationStatus.fromJobStatus(archivedExecutionGraph.getState()))`
 to a finally block, and log the exception for analysis, then throw it continue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to