You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/05/13 11:46:55 UTC
[6/6] incubator-ignite git commit: #ignite-373: Remote jobs clear,
size,
removeAll should rethrow all exceptions except ClusterTopologyException.
#ignite-373: Remote jobs clear, size, removeAll should rethrow all exceptions except ClusterTopologyException.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b8b8cf6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b8b8cf6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b8b8cf6d
Branch: refs/heads/ignite-373
Commit: b8b8cf6d8b599e7719b0d6571c6c103f43d37e86
Parents: 525d42a
Author: ivasilinets <iv...@gridgain.com>
Authored: Wed May 13 12:44:53 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Wed May 13 12:44:53 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheAdapter.java | 18 ++++++++++++++++++
.../distributed/GridDistributedCacheAdapter.java | 9 +++++++++
2 files changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b8b8cf6d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 624c528..4106cb0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -5591,6 +5591,15 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) {
+ IgniteException e = res.getException();
+
+ if (e != null) {
+ if (e instanceof ClusterTopologyException)
+ return ComputeJobResultPolicy.WAIT;
+
+ throw new IgniteException("Remote job threw exception.", e);
+ }
+
return ComputeJobResultPolicy.WAIT;
}
@@ -5650,6 +5659,15 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
/** {@inheritDoc} */
@Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) {
+ IgniteException e = res.getException();
+
+ if (e != null) {
+ if (e instanceof ClusterTopologyException)
+ return ComputeJobResultPolicy.WAIT;
+
+ throw new IgniteException("Remote job threw exception.", e);
+ }
+
return ComputeJobResultPolicy.WAIT;
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b8b8cf6d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index b7ac198..56f8e1f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -281,6 +281,15 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
/** {@inheritDoc} */
@Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) {
+ IgniteException e = res.getException();
+
+ if (e != null) {
+ if (e instanceof ClusterTopologyException)
+ return ComputeJobResultPolicy.WAIT;
+
+ throw new IgniteException("Remote job threw exception.", e);
+ }
+
return ComputeJobResultPolicy.WAIT;
}