Skip to content
Closed
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 @@ -56,36 +56,23 @@ public static TestFlinkRunner create(boolean streaming) {
public PipelineResult run(Pipeline pipeline) {
try {
return delegate.run(pipeline);
} catch (Throwable e) {
} catch (Throwable t) {
// Special case hack to pull out assertion errors from PAssert; instead there should
// probably be a better story along the lines of UserCodeException.
Throwable cause = e;
Throwable oldCause = e;
PipelineExecutionException executionException = null;
do {

// find UserCodeException and throw PipelineExecutionException
if (cause instanceof UserCodeException) {
executionException = new PipelineExecutionException(cause.getCause());
}

if (cause.getCause() == null) {
break;
}

oldCause = cause;
cause = cause.getCause();

} while (!oldCause.equals(cause));
if (cause instanceof AssertionError) {
throw (AssertionError) cause;
} else {
if (executionException != null) {
throw executionException;
} else {
throw e;
UserCodeException innermostUserCodeException = null;
Throwable current = t;
for (; current.getCause() != null; current = current.getCause()) {
if (current instanceof UserCodeException) {
innermostUserCodeException = ((UserCodeException) current);
}
}
if (innermostUserCodeException != null) {
current = innermostUserCodeException.getCause();
}
if (current instanceof AssertionError) {
throw (AssertionError) current;
}
throw new PipelineExecutionException(current);
}
}

Expand Down
2 changes: 1 addition & 1 deletion runners/google-cloud-dataflow-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<packaging>jar</packaging>

<properties>
<dataflow.container_version>beam-master-20170307</dataflow.container_version>
<dataflow.container_version>beam-master-20170314</dataflow.container_version>
<dataflow.environment_major_version>6</dataflow.environment_major_version>
</properties>

Expand Down
Loading