This is an automated email from the ASF dual-hosted git repository.
suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 1da1e40 [GOBBLIN-980] Fix AzkabanClient always throwing exception
when cancelling flow
1da1e40 is described below
commit 1da1e4040f95c9acba497ee208bf8c996cc8c9e8
Author: Jack Moseley <[email protected]>
AuthorDate: Mon Nov 25 21:19:41 2019 -0800
[GOBBLIN-980] Fix AzkabanClient always throwing exception when cancelling
flow
Closes #2826 from jack-moseley/azkaban-client-fix
---
.../apache/gobblin/service/modules/orchestration/AzkabanClient.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
b/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
index 1f9293a..ccbc300 100644
---
a/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
+++
b/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanClient.java
@@ -425,8 +425,10 @@ public class AzkabanClient implements Closeable {
private <T> T runWithRetry(Callable callable, Class<T> cls) throws
AzkabanClientException {
try {
AzkabanClientStatus status = this.retryer.call(callable);
- if (status.getClass().equals(cls)) {
+ if (cls.isAssignableFrom(status.getClass())) {
return ((T)status);
+ } else {
+ throw new AzkabanClientException(String.format("Unexpected response
type, expected: %s actual: %s", cls, status.getClass()));
}
} catch (ExecutionException e) {
Throwables.propagateIfPossible(e.getCause(),
AzkabanClientException.class);