abstractdog commented on code in PR #5103:
URL: https://github.com/apache/hive/pull/5103#discussion_r1505909179
##########
ql/src/java/org/apache/hadoop/hive/ql/reexec/ReExecuteLostAMQueryPlugin.java:
##########
@@ -44,15 +50,28 @@ public void run(HookContext hookContext) throws Exception {
if (hookContext.getHookType() == HookContext.HookType.ON_FAILURE_HOOK) {
Throwable exception = hookContext.getException();
- if (exception != null && exception.getMessage() != null) {
+ if (!(exception instanceof TezRuntimeException)) {
+ LOG.info("Exception is not a TezRuntimeException, no need to check
further with ReExecuteLostAMQueryPlugin");
+ return;
+ }
+
+ TezRuntimeException tre = (TezRuntimeException)exception;
+
+ if (tre != null && tre.getMessage() != null) {
+ dagIds.add(tre.getDagId());
// When HS2 does not manage the AMs, tez AMs are registered with
zookeeper and HS2 discovers it,
// failure of unmanaged AMs will throw AM record not being found in
zookeeper.
String unmanagedAMFailure = "AM record not found (likely died)";
- if
(lostAMContainerErrorPattern.matcher(exception.getMessage()).matches()
- || exception.getMessage().contains(unmanagedAMFailure)) {
+ // DAG lost in the scenario described at TEZ-4543
+ String dagLostFailure = "No running DAG at present";
+
+ if (lostAMContainerErrorPattern.matcher(tre.getMessage()).matches()
+ || tre.getMessage().contains(unmanagedAMFailure)
+ || tre.getMessage().contains(dagLostFailure)) {
retryPossible = true;
}
- LOG.info("Got exception message: {} retryPossible: {}",
exception.getMessage(), retryPossible);
+ LOG.info("Got exception message: {} retryPossible: {}, dags seen so
far: {}", tre.getMessage(), retryPossible,
Review Comment:
ack
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]