Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEZ-4364: TestFaultTolerance timeout on master #171

Merged
merged 1 commit into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.tez.runtime.api.Event;

import com.google.common.annotations.VisibleForTesting;

import java.util.Objects;

/**
Expand Down Expand Up @@ -79,11 +81,14 @@ private InputReadErrorEvent(final String diagnostics, final int index, final int
this.destinationLocalhostName = destinationLocalhostName;
}

public static InputReadErrorEvent create(String diagnostics, int index, int version,
boolean isLocalFetch, boolean isDiskErrorAtSource) {
return create(diagnostics, index, version, 1, isLocalFetch, isDiskErrorAtSource, null);
}

/**
* Creates an InputReadErrorEvent from less parameters, supposed to be used from tests only.
* @param diagnostics
* @param index
* @param version
* @return InputReadErrorEvent instance
*/
@VisibleForTesting
public static InputReadErrorEvent create(String diagnostics, int index, int version) {
return create(diagnostics, index, version, 1, false, false, null);
}
Expand Down
7 changes: 4 additions & 3 deletions tez-tests/src/test/java/org/apache/tez/test/TestInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public int doRead() {
for (int i=0; i<getNumPhysicalInputs(); ++i) {
String msg = ("FailingInput: " + getContext().getUniqueIdentifier() +
" index: " + i + " version: " + lastInputReadyValue);
events.add(InputReadErrorEvent.create(msg, i, lastInputReadyValue));
events.add(InputReadErrorEvent.create(msg, i, lastInputReadyValue, 1, false, false, "localhost"));
LOG.info("Failing input: " + msg);
}
} else {
Expand All @@ -189,7 +189,8 @@ public int doRead() {
}
String msg = ("FailingInput: " + getContext().getUniqueIdentifier() +
" index: " + index.intValue() + " version: " + lastInputReadyValue);
events.add(InputReadErrorEvent.create(msg, index.intValue(), lastInputReadyValue));
events.add(InputReadErrorEvent.create(msg, index.intValue(), lastInputReadyValue, 1, false, false,
"localhost"));
LOG.info("Failing input: " + msg);
}
}
Expand Down Expand Up @@ -263,7 +264,7 @@ public int doRead() {
getContext().getUniqueIdentifier() +
" index: " + index + " version: " + sourceInputVersion;
LOG.info(msg);
events.add(InputReadErrorEvent.create(msg, index, sourceInputVersion));
events.add(InputReadErrorEvent.create(msg, index, sourceInputVersion, 1, false, false, "localhost"));
}
}
}
Expand Down