http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java index a83c13f..8b7daff 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/FailoverContext.java @@ -41,7 +41,7 @@ public interface FailoverContext { * * @param top Topology to pick balanced node from. * @return The next balanced node. - * @throws IgniteCheckedException If anything failed. + * @throws IgniteException If anything failed. */ - public ClusterNode getBalancedNode(List<ClusterNode> top) throws IgniteCheckedException; + public ClusterNode getBalancedNode(List<ClusterNode> top) throws IgniteException; }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.java index c61cfe0..00582a2 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.java @@ -107,8 +107,8 @@ public interface LoadBalancingSpi extends IgniteSpi { * @param ses Grid task session for currently executing task. * @param top Topology of task nodes from which to pick the best balanced node for given job. * @param job Job for which to pick the best balanced node. - * @throws IgniteCheckedException If failed to get next balanced node. + * @throws IgniteException If failed to get next balanced node. * @return Best balanced node for the given job within given task session. */ - public ClusterNode getBalancedNode(ComputeTaskSession ses, List<ClusterNode> top, ComputeJob job) throws IgniteCheckedException; + public ClusterNode getBalancedNode(ComputeTaskSession ses, List<ClusterNode> top, ComputeJob job) throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java index 7969a77..646e8fc 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java @@ -407,7 +407,7 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa /** {@inheritDoc} */ @Override public ClusterNode getBalancedNode(ComputeTaskSession ses, List<ClusterNode> top, ComputeJob job) - throws IgniteCheckedException { + throws IgniteException { A.notNull(ses, "ses"); A.notNull(top, "top"); A.notNull(job, "job"); @@ -433,10 +433,10 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa * @param top List of all nodes. * @param node Node to get load for. * @return Node load. - * @throws IgniteCheckedException If returned load is negative. + * @throws IgniteException If returned load is negative. */ @SuppressWarnings({"TooBroadScope"}) - private double getLoad(Collection<ClusterNode> top, ClusterNode node) throws IgniteCheckedException { + private double getLoad(Collection<ClusterNode> top, ClusterNode node) throws IgniteException { assert !F.isEmpty(top); int jobsSentSinceLastUpdate = 0; @@ -455,7 +455,7 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa double load = probe.getLoad(node, jobsSentSinceLastUpdate); if (load < 0) - throw new IgniteCheckedException("Failed to obtain non-negative load from adaptive load probe: " + load); + throw new IgniteException("Failed to obtain non-negative load from adaptive load probe: " + load); return load; } @@ -469,9 +469,9 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa /** * @param top Task topology. - * @throws IgniteCheckedException If any load was negative. + * @throws IgniteException If any load was negative. */ - WeightedTopology(List<ClusterNode> top) throws IgniteCheckedException { + WeightedTopology(List<ClusterNode> top) throws IgniteException { assert !F.isEmpty(top); double totalLoad = 0; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java index a6efebc..7279208 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinGlobalLoadBalancer.java @@ -129,9 +129,9 @@ class RoundRobinGlobalLoadBalancer { * * @param top Topology to pick from. * @return Best balanced node. - * @throws IgniteCheckedException Thrown in case of any error. + * @throws IgniteException Thrown in case of any error. */ - ClusterNode getBalancedNode(Collection<ClusterNode> top) throws IgniteCheckedException { + ClusterNode getBalancedNode(Collection<ClusterNode> top) throws IgniteException { assert !F.isEmpty(top); awaitInitializationCompleted(); @@ -150,7 +150,7 @@ class RoundRobinGlobalLoadBalancer { int cycleSize = nodes.size(); if (cycleSize == 0) - throw new IgniteCheckedException("Task topology does not have any alive nodes."); + throw new IgniteException("Task topology does not have any alive nodes."); AtomicInteger idx; @@ -217,10 +217,10 @@ class RoundRobinGlobalLoadBalancer { * @param top Topology for current request. * @param topMap Topology map. * @param nodes Current balanced nodes. - * @throws IgniteCheckedException If balancer can not return any node. + * @throws IgniteException If balancer can not return any node. */ private static void checkBalancerNodes(Collection<ClusterNode> top, Map<UUID, ClusterNode> topMap, Iterable<UUID> nodes) - throws IgniteCheckedException { + throws IgniteException { boolean contains = false; @@ -233,15 +233,15 @@ class RoundRobinGlobalLoadBalancer { } if (!contains) - throw new IgniteCheckedException("Task topology does not have alive nodes: " + top); + throw new IgniteException("Task topology does not have alive nodes: " + top); } /** * Awaits initialization of balancing nodes to be completed. * - * @throws IgniteCheckedException Thrown in case of thread interruption. + * @throws IgniteException Thrown in case of thread interruption. */ - private void awaitInitializationCompleted() throws IgniteCheckedException { + private void awaitInitializationCompleted() throws IgniteException { try { if (initLatch.getCount() > 0) initLatch.await(); @@ -249,7 +249,7 @@ class RoundRobinGlobalLoadBalancer { catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new IgniteCheckedException("Global balancer was interrupted.", e); + throw new IgniteException("Global balancer was interrupted.", e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java index e1f5ea1..93e969c 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java @@ -52,7 +52,7 @@ import static org.apache.ignite.events.IgniteEventType.*; * <pre name="code" class="java"> * public class MyFooBarTask extends GridComputeTaskSplitAdapter<Object, Object> { * @Override - * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { + * protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteException { * List<MyFooBarJob> jobs = new ArrayList<MyFooBarJob>(gridSize); * * for (int i = 0; i < gridSize; i++) { @@ -78,7 +78,7 @@ import static org.apache.ignite.events.IgniteEventType.*; * GridComputeLoadBalancer balancer; * * // Map jobs to grid nodes. - * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws IgniteCheckedException { + * public Map<? extends ComputeJob, GridNode> map(List<GridNode> subgrid, String arg) throws IgniteException { * Map<MyFooBarJob, GridNode> jobs = new HashMap<MyFooBarJob, GridNode>(subgrid.size()); * * // In more complex cases, you can actually do @@ -92,7 +92,7 @@ import static org.apache.ignite.events.IgniteEventType.*; * } * * // Aggregate results into one compound result. - * public String reduce(List<GridComputeJobResult> results) throws IgniteCheckedException { + * public String reduce(List<GridComputeJobResult> results) throws IgniteException { * // For the purpose of this example we simply * // concatenate string representation of every * // job result @@ -270,7 +270,7 @@ public class RoundRobinLoadBalancingSpi extends IgniteSpiAdapter implements Load /** {@inheritDoc} */ @Override public ClusterNode getBalancedNode(ComputeTaskSession ses, List<ClusterNode> top, ComputeJob job) - throws IgniteCheckedException { + throws IgniteException { A.notNull(ses, "ses", top, "top"); if (isPerTask) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java index e435a7b..534ba0d 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerContext.java @@ -67,9 +67,9 @@ public interface StreamerContext { * * @param clo Function to be executed on individual nodes. * @return Result received from all streamers. - * @throws IgniteCheckedException If query execution failed. + * @throws IgniteException If query execution failed. */ - public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws IgniteCheckedException; + public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws IgniteException; /** * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes @@ -80,19 +80,19 @@ public interface StreamerContext { * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on * which this streamer is running will be queried. * @return Result received from all streamers. - * @throws IgniteCheckedException If query execution failed. + * @throws IgniteException If query execution failed. */ public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo, Collection<ClusterNode> nodes) - throws IgniteCheckedException; + throws IgniteException; /** * Queries all streamer nodes deployed within grid. Given closure will be executed on each streamer node * in the grid. No result is collected. * * @param clo Function to be executed on individual nodes. - * @throws IgniteCheckedException If closure execution failed. + * @throws IgniteException If closure execution failed. */ - public void broadcast(IgniteInClosure<StreamerContext> clo) throws IgniteCheckedException; + public void broadcast(IgniteInClosure<StreamerContext> clo) throws IgniteException; /** * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes on @@ -101,9 +101,9 @@ public interface StreamerContext { * @param clo Function to be executed on individual nodes. * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on * which this streamer is running will be queried. - * @throws IgniteCheckedException If closure execution failed. + * @throws IgniteException If closure execution failed. */ - public void broadcast(IgniteInClosure<StreamerContext> clo, Collection<ClusterNode> nodes) throws IgniteCheckedException; + public void broadcast(IgniteInClosure<StreamerContext> clo, Collection<ClusterNode> nodes) throws IgniteException; /** * Queries all streamer nodes deployed within grid. Given closure will be executed on each streamer node in @@ -113,9 +113,9 @@ public interface StreamerContext { * @param clo Function to be executed on individual nodes. * @param rdc Reducer to reduce results received from remote nodes. * @return Reducer result. - * @throws IgniteCheckedException If query execution failed. + * @throws IgniteException If query execution failed. */ - public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc) throws IgniteCheckedException; + public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc) throws IgniteException; /** * Queries streamer nodes deployed within grid. Given closure will be executed on those of passed nodes on which @@ -127,8 +127,8 @@ public interface StreamerContext { * @param nodes Optional list of nodes to execute query on, if empty, then all nodes on * which this streamer is running will be queried. * @return Reducer result. - * @throws IgniteCheckedException If query execution failed. + * @throws IgniteException If query execution failed. */ public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc, - Collection<ClusterNode> nodes) throws IgniteCheckedException; + Collection<ClusterNode> nodes) throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java index 1088908..3d0e757 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerStage.java @@ -46,8 +46,8 @@ public interface StreamerStage<IN> { * @param ctx Streamer context. * @param evts Input events. * @return Map of stage name to collection of events. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ @Nullable public Map<String, Collection<?>> run(StreamerContext ctx, Collection<IN> evts) - throws IgniteCheckedException; + throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java index b5c288a..25ace53 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/StreamerWindow.java @@ -95,18 +95,18 @@ public interface StreamerWindow<E> extends Iterable<E> { * * @param evt Event to add. * @return {@code True} if event was added. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public boolean enqueue(E evt) throws IgniteCheckedException; + public boolean enqueue(E evt) throws IgniteException; /** * Adds events to window. * * @param evts Events to add. * @return {@code} - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public boolean enqueue(E... evts) throws IgniteCheckedException; + public boolean enqueue(E... evts) throws IgniteException; /** * Adds all events to window. @@ -114,17 +114,17 @@ public interface StreamerWindow<E> extends Iterable<E> { * @param evts Collection of events to add. * @return {@code True} if all events were added, {@code false} if at * least 1 event was skipped. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public boolean enqueueAll(Collection<E> evts) throws IgniteCheckedException; + public boolean enqueueAll(Collection<E> evts) throws IgniteException; /** * Dequeues last element from windows. Will return {@code null} if window is empty. * * @return Dequeued element. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - @Nullable public E dequeue() throws IgniteCheckedException; + @Nullable public E dequeue() throws IgniteException; /** * Dequeues up to {@code cnt} elements from window. If current window size is less than {@code cnt}, @@ -132,35 +132,35 @@ public interface StreamerWindow<E> extends Iterable<E> { * * @param cnt Count to dequeue. * @return Collection of dequeued elements. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public Collection<E> dequeue(int cnt) throws IgniteCheckedException; + public Collection<E> dequeue(int cnt) throws IgniteException; /** * Dequeues all elements from window. * * @return Collection of dequeued elements. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public Collection<E> dequeueAll() throws IgniteCheckedException; + public Collection<E> dequeueAll() throws IgniteException; /** * If window supports eviction, this method will return next evicted element. * * @return Polls and returns next evicted event or {@code null} if eviction queue is empty or if * window does not support eviction. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - @Nullable public E pollEvicted() throws IgniteCheckedException; + @Nullable public E pollEvicted() throws IgniteException; /** * If window supports eviction, this method will return up to {@code cnt} evicted elements. * * @param cnt Number of elements to evict. * @return Collection of evicted elements. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public Collection<E> pollEvicted(int cnt) throws IgniteCheckedException; + public Collection<E> pollEvicted(int cnt) throws IgniteException; /** * If window supports batch eviction, this method will poll next evicted batch from window. @@ -169,24 +169,24 @@ public interface StreamerWindow<E> extends Iterable<E> { * If window does not support eviction, will return empty collection. * * @return Next evicted batch. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public Collection<E> pollEvictedBatch() throws IgniteCheckedException; + public Collection<E> pollEvictedBatch() throws IgniteException; /** * If window supports eviction, this method will return all available evicted elements. * * @return Collection of evicted elements. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public Collection<E> pollEvictedAll() throws IgniteCheckedException; + public Collection<E> pollEvictedAll() throws IgniteException; /** * Clears all evicted entries. * - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - public void clearEvicted() throws IgniteCheckedException; + public void clearEvicted() throws IgniteException; /** * Create window snapshot. Evicted entries are not included. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndex.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndex.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndex.java index 97ac2ae..8a3cde4 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndex.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndex.java @@ -42,7 +42,7 @@ import java.util.*; * } * * @Nullable @Override public Double onAdded(GridStreamerIndexEntry<StockPriceEvent, String, Double> entry, - * StockPriceEvent evt) throws IgniteCheckedException { + * StockPriceEvent evt) throws IgniteException { * return Math.min(entry.value(), evt.getPrice()); // Update the minimum on new event. * } * http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProvider.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProvider.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProvider.java index 92ca30b..72cbae3 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProvider.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProvider.java @@ -55,18 +55,18 @@ public interface StreamerIndexProvider<E, K, V> extends StreamerIndexProviderMBe * * @param sync Index update synchronizer. * @param evt Event to add to an index. - * @throws IgniteCheckedException If failed to add event to an index. + * @throws IgniteException If failed to add event to an index. */ - public void add(StreamerIndexUpdateSync sync, E evt) throws IgniteCheckedException; + public void add(StreamerIndexUpdateSync sync, E evt) throws IgniteException; /** * Removes an event from index. * * @param sync Index update synchronizer. * @param evt Event to remove from index. - * @throws IgniteCheckedException If failed to add event to an index. + * @throws IgniteException If failed to add event to an index. */ - public void remove(StreamerIndexUpdateSync sync, E evt) throws IgniteCheckedException; + public void remove(StreamerIndexUpdateSync sync, E evt) throws IgniteException; /** * Gets event indexing policy, which defines how events http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProviderAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProviderAdapter.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProviderAdapter.java index 7f97153..01507b0 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProviderAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexProviderAdapter.java @@ -146,7 +146,7 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI * @param sync Sync. * @param evt Event. */ - @Override public void add(StreamerIndexUpdateSync sync, E evt) throws IgniteCheckedException { + @Override public void add(StreamerIndexUpdateSync sync, E evt) throws IgniteException { assert evt != null; if (threadLocKey.get() != null) @@ -174,7 +174,7 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI * @param sync Sync. * @param evt Event. */ - @Override public void remove(StreamerIndexUpdateSync sync, E evt) throws IgniteCheckedException { + @Override public void remove(StreamerIndexUpdateSync sync, E evt) throws IgniteException { assert evt != null; if (threadLocKey.get() != null) @@ -301,9 +301,9 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI * @param evt Event. * @param key key. * @param sync Sync. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - protected abstract void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException; + protected abstract void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException; /** * Remove event from the index. @@ -311,18 +311,18 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI * @param evt Event. * @param key Key. * @param sync Sync. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - protected abstract void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException; + protected abstract void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException; /** * Lock updates on particular key. * * @param key Key. * @param sync Sync. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - private void lockKey(K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + private void lockKey(K key, StreamerIndexUpdateSync sync) throws IgniteException { assert key != null; assert sync != null; @@ -334,7 +334,7 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI old.await(); } catch (InterruptedException e) { - throw new IgniteCheckedException("Failed to lock on key (thread has been interrupted): " + key, e); + throw new IgniteException("Failed to lock on key (thread has been interrupted): " + key, e); } // No point to replace or remove sync here. @@ -362,9 +362,9 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI * * @param key Key. * @param sync Sync. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - protected void lockIndexKey(IndexKey<V> key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + protected void lockIndexKey(IndexKey<V> key, StreamerIndexUpdateSync sync) throws IgniteException { assert key != null; assert sync != null; assert isUnique(); @@ -377,7 +377,7 @@ public abstract class StreamerIndexProviderAdapter<E, K, V> implements StreamerI old.await(); } catch (InterruptedException e) { - throw new IgniteCheckedException("Failed to lock on key (thread has been interrupted): " + key, e); + throw new IgniteException("Failed to lock on key (thread has been interrupted): " + key, e); } // No point to replace or remove sync here. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexUpdater.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexUpdater.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexUpdater.java index ce75c70..41d3996 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexUpdater.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/StreamerIndexUpdater.java @@ -56,9 +56,9 @@ public interface StreamerIndexUpdater<E, K, V> { * @param evt New event. * @return New index value for given key, if {@code null}, then current * index entry will be removed the index. - * @throws IgniteCheckedException If entry should not be added to index (e.g. if uniqueness is violated). + * @throws IgniteException If entry should not be added to index (e.g. if uniqueness is violated). */ - @Nullable public V onAdded(StreamerIndexEntry<E, K, V> entry, E evt) throws IgniteCheckedException; + @Nullable public V onAdded(StreamerIndexEntry<E, K, V> entry, E evt) throws IgniteException; /** * Callback invoked whenever an event is being removed from the window and has http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/hash/StreamerHashIndexProvider.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/hash/StreamerHashIndexProvider.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/hash/StreamerHashIndexProvider.java index ec42b23..f3ef4ec 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/hash/StreamerHashIndexProvider.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/hash/StreamerHashIndexProvider.java @@ -57,7 +57,7 @@ public class StreamerHashIndexProvider<E, K, V> extends StreamerIndexProviderAda } /** {@inheritDoc} */ - @Override protected void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + @Override protected void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException { State<E, K, V> state0 = state.get(); if (state0 != null) @@ -92,7 +92,7 @@ public class StreamerHashIndexProvider<E, K, V> extends StreamerIndexProviderAda } else { if (isUnique()) - throw new IgniteCheckedException("Index unique key violation [evt=" + evt + ", key=" + key + ']'); + throw new IgniteException("Index unique key violation [evt=" + evt + ", key=" + key + ']'); V val = updater.onAdded(oldEntry, evt); @@ -122,7 +122,7 @@ public class StreamerHashIndexProvider<E, K, V> extends StreamerIndexProviderAda } /** {@inheritDoc} */ - @Override protected void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + @Override protected void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException { State<E, K, V> state0 = state.get(); if (state0 != null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/index/tree/StreamerTreeIndexProvider.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/index/tree/StreamerTreeIndexProvider.java b/modules/core/src/main/java/org/apache/ignite/streamer/index/tree/StreamerTreeIndexProvider.java index 09cfad1..a9a81a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/index/tree/StreamerTreeIndexProvider.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/index/tree/StreamerTreeIndexProvider.java @@ -93,7 +93,7 @@ public class StreamerTreeIndexProvider<E, K, V> extends StreamerIndexProviderAda } /** {@inheritDoc} */ - @Override protected void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + @Override protected void add(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException { State<E, K, V> state0 = state.get(); if (state0 != null) @@ -212,7 +212,7 @@ public class StreamerTreeIndexProvider<E, K, V> extends StreamerIndexProviderAda } /** {@inheritDoc} */ - @Override protected void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteCheckedException { + @Override protected void remove(E evt, K key, StreamerIndexUpdateSync sync) throws IgniteException { State<E, K, V> state0 = state.get(); if (state0 != null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java index 76f5d8b..d9b997f 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeBatchWindow.java @@ -76,15 +76,15 @@ public class StreamerBoundedSizeBatchWindow<E> extends StreamerWindowAdapter<E> } /** {@inheritDoc} */ - @Override public void checkConfiguration() throws IgniteCheckedException { + @Override public void checkConfiguration() throws IgniteException { if (batchSize <= 0) - throw new IgniteCheckedException("Failed to initialize window (batchSize size must be positive) " + + throw new IgniteException("Failed to initialize window (batchSize size must be positive) " + "[windowClass=" + getClass().getSimpleName() + ", maximumBatches=" + maxBatches + ", batchSize=" + batchSize + ']'); if (maxBatches < 0) - throw new IgniteCheckedException("Failed to initialize window (maximumBatches cannot be negative) " + + throw new IgniteException("Failed to initialize window (maximumBatches cannot be negative) " + "[windowClass=" + getClass().getSimpleName() + ", maximumBatches=" + maxBatches + ", batchSize=" + batchSize + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeWindowAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeWindowAdapter.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeWindowAdapter.java index 0bc2d26..c554e21 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeWindowAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedSizeWindowAdapter.java @@ -65,9 +65,9 @@ abstract class StreamerBoundedSizeWindowAdapter<E, T> extends StreamerWindowAdap } /** {@inheritDoc} */ - @Override public void checkConfiguration() throws IgniteCheckedException { + @Override public void checkConfiguration() throws IgniteException { if (maxSize < 0) - throw new IgniteCheckedException("Failed to initialize window (maximumSize cannot be negative) " + + throw new IgniteException("Failed to initialize window (maximumSize cannot be negative) " + "[windowClass=" + getClass().getSimpleName() + ", maxSize=" + maxSize + ", unique=" + unique + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java index 829e6fa..2514471 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeBatchWindow.java @@ -97,16 +97,16 @@ public class StreamerBoundedTimeBatchWindow<E> extends StreamerWindowAdapter<E> } /** {@inheritDoc} */ - @Override public void checkConfiguration() throws IgniteCheckedException { + @Override public void checkConfiguration() throws IgniteException { if (maxBatches < 0) - throw new IgniteCheckedException("Failed to initialize window (maximumBatches cannot be negative) " + + throw new IgniteException("Failed to initialize window (maximumBatches cannot be negative) " + "[windowClass=" + getClass().getSimpleName() + ", maximumBatches=" + maxBatches + ", batchSize=" + batchSize + ", batchTimeInterval=" + batchTimeInterval + ']'); if (batchSize < 0) - throw new IgniteCheckedException("Failed to initialize window (batchSize cannot be negative) " + + throw new IgniteException("Failed to initialize window (batchSize cannot be negative) " + "[windowClass=" + getClass().getSimpleName() + ", maximumBatches=" + maxBatches + ", batchSize=" + batchSize + @@ -115,7 +115,7 @@ public class StreamerBoundedTimeBatchWindow<E> extends StreamerWindowAdapter<E> batchSize = Integer.MAX_VALUE; if (batchTimeInterval <= 0) - throw new IgniteCheckedException("Failed to initialize window (batchTimeInterval must be positive) " + + throw new IgniteException("Failed to initialize window (batchTimeInterval must be positive) " + "[windowClass=" + getClass().getSimpleName() + ", maximumBatches=" + maxBatches + ", batchSize=" + batchSize + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeWindow.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeWindow.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeWindow.java index f37116e..2ab5a9d 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeWindow.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerBoundedTimeWindow.java @@ -94,7 +94,7 @@ public class StreamerBoundedTimeWindow<E> extends StreamerWindowAdapter<E> { } /** {@inheritDoc} */ - @Override public void checkConfiguration() throws IgniteCheckedException { + @Override public void checkConfiguration() throws IgniteException { if (timeInterval <= 0) throw new IgniteCheckedException("Failed to initialize window (timeInterval must be positive): [windowClass=" + getClass().getSimpleName() + ", maxSize=" + maxSize + ", timeInterval=" + timeInterval + ", unique=" + http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerWindowAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerWindowAdapter.java b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerWindowAdapter.java index 3008801..c3f0e6a 100644 --- a/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerWindowAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/streamer/window/StreamerWindowAdapter.java @@ -81,7 +81,7 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream protected abstract GridStreamerWindowIterator<E> iterator0(); /** {@inheritDoc} */ - @Override public boolean enqueue(E evt) throws IgniteCheckedException { + @Override public boolean enqueue(E evt) throws IgniteException { lock.readLock(); try { @@ -102,12 +102,12 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream } /** {@inheritDoc} */ - @Override public boolean enqueue(E... evts) throws IgniteCheckedException { + @Override public boolean enqueue(E... evts) throws IgniteException { return enqueueAll(Arrays.asList(evts)); } /** {@inheritDoc} */ - @Override public boolean enqueueAll(Collection<E> evts) throws IgniteCheckedException { + @Override public boolean enqueueAll(Collection<E> evts) throws IgniteException { lock.readLock(); try { @@ -144,17 +144,17 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream protected abstract boolean enqueue0(E evt); /** {@inheritDoc} */ - @Override public E dequeue() throws IgniteCheckedException { + @Override public E dequeue() throws IgniteException { return F.first(dequeue(1)); } /** {@inheritDoc} */ - @Override public Collection<E> dequeueAll() throws IgniteCheckedException { + @Override public Collection<E> dequeueAll() throws IgniteException { return dequeue(size()); } /** {@inheritDoc} */ - @Override public Collection<E> dequeue(int cnt) throws IgniteCheckedException { + @Override public Collection<E> dequeue(int cnt) throws IgniteException { lock.readLock(); try { @@ -182,17 +182,17 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream protected abstract Collection<E> dequeue0(int cnt); /** {@inheritDoc} */ - @Override public E pollEvicted() throws IgniteCheckedException { + @Override public E pollEvicted() throws IgniteException { return F.first(pollEvicted(1)); } /** {@inheritDoc} */ - @Override public Collection<E> pollEvictedAll() throws IgniteCheckedException { + @Override public Collection<E> pollEvictedAll() throws IgniteException { return pollEvicted(evictionQueueSize()); } /** {@inheritDoc} */ - @Override public Collection<E> pollEvicted(int cnt) throws IgniteCheckedException { + @Override public Collection<E> pollEvicted(int cnt) throws IgniteException { lock.readLock(); try { @@ -219,7 +219,7 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream protected abstract Collection<E> pollEvicted0(int cnt); /** {@inheritDoc} */ - @Override public Collection<E> pollEvictedBatch() throws IgniteCheckedException { + @Override public Collection<E> pollEvictedBatch() throws IgniteException { lock.readLock(); try { @@ -247,7 +247,7 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream protected abstract Collection<E> pollEvictedBatch0(); /** {@inheritDoc} */ - @Override public final void start() throws IgniteCheckedException { + @Override public final void start() throws IgniteException { checkConfiguration(); if (idxs != null) { @@ -278,9 +278,9 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream /** * Check window configuration. * - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - protected abstract void checkConfiguration() throws IgniteCheckedException; + protected abstract void checkConfiguration() throws IgniteException; /** * Reset routine. @@ -426,7 +426,7 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream } /** {@inheritDoc} */ - @Override public void clearEvicted() throws IgniteCheckedException { + @Override public void clearEvicted() throws IgniteException { pollEvictedAll(); } @@ -435,9 +435,9 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream * * @param evt Event. * @param rmv Remove flag. - * @throws IgniteCheckedException If index update failed. + * @throws IgniteException If index update failed. */ - protected void updateIndexes(E evt, boolean rmv) throws IgniteCheckedException { + protected void updateIndexes(E evt, boolean rmv) throws IgniteException { if (idxs != null) { StreamerIndexUpdateSync sync = new StreamerIndexUpdateSync(); @@ -512,14 +512,8 @@ public abstract class StreamerWindowAdapter<E> implements LifecycleAware, Stream try { E evt = iter.removex(); - if (evt != null) { - try { - updateIndexes(evt, true); - } - catch (IgniteCheckedException e) { - throw new IgniteException("Faied to remove event: " + evt, e); - } - } + if (evt != null) + updateIndexes(evt, true); } finally { lock.readUnlock(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/client/router/impl/GridTcpRouterImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/client/router/impl/GridTcpRouterImpl.java b/modules/core/src/main/java/org/gridgain/client/router/impl/GridTcpRouterImpl.java index 3c3e848..dec4df1 100644 --- a/modules/core/src/main/java/org/gridgain/client/router/impl/GridTcpRouterImpl.java +++ b/modules/core/src/main/java/org/gridgain/client/router/impl/GridTcpRouterImpl.java @@ -81,12 +81,12 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif * * @throws IgniteCheckedException If failed. */ - @Override public void start() throws IgniteCheckedException { + @Override public void start() throws IgniteException { try { client = createClient(cfg); } catch (GridClientException e) { - throw new IgniteCheckedException("Failed to initialise embedded client.", e); + throw new IgniteException("Failed to initialise embedded client.", e); } GridNioServerListener<GridClientMessage> lsnr; @@ -104,7 +104,7 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif lsnr = new GridTcpRouterNioListenerOsImpl(log, client); } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) { - throw new IgniteCheckedException("Failed to create NIO listener.", e); + throw new IgniteException("Failed to create NIO listener.", e); } parser = new GridTcpRouterNioParser(); @@ -115,7 +115,7 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif hostAddr = InetAddress.getByName(cfg.getHost()); } catch (UnknownHostException e) { - throw new IgniteCheckedException("Failed to resolve grid address for configured host: " + cfg.getHost(), e); + throw new IgniteException("Failed to resolve grid address for configured host: " + cfg.getHost(), e); } SSLContext sslCtx; @@ -126,7 +126,7 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif sslCtx = sslCtxFactory == null ? null : sslCtxFactory.createSslContext(); } catch (SSLException e) { - throw new IgniteCheckedException("Failed to create SSL context.", e); + throw new IgniteException("Failed to create SSL context.", e); } for (int port = cfg.getPort(), last = port + cfg.getPortRange(); port <= last; port++) { @@ -146,7 +146,7 @@ public class GridTcpRouterImpl implements GridTcpRouter, GridTcpRouterMBean, Lif } if (bindPort == 0) - throw new IgniteCheckedException("Failed to bind TCP router server (possibly all ports in range " + + throw new IgniteException("Failed to bind TCP router server (possibly all ports in range " + "are in use) [firstPort=" + cfg.getPort() + ", lastPort=" + (cfg.getPort() + cfg.getPortRange()) + ", addr=" + hostAddr + ']'); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java b/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java index 3ae1a50..f0bed92 100644 --- a/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java +++ b/modules/core/src/main/java/org/gridgain/grid/GridDeploymentException.java @@ -15,7 +15,7 @@ import org.jetbrains.annotations.*; /** * Deployment or re-deployment failed. */ -public class GridDeploymentException extends IgniteCheckedException { +public class GridDeploymentException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java b/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java index 8c6230d..0e76d25 100644 --- a/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java +++ b/modules/core/src/main/java/org/gridgain/grid/GridInterruptedException.java @@ -12,10 +12,10 @@ package org.gridgain.grid; import org.apache.ignite.*; /** - * This exception is used to wrap standard {@link InterruptedException} into {@link IgniteCheckedException}. + * This exception is used to wrap standard {@link InterruptedException} into {@link IgniteException}. */ @SuppressWarnings({"TypeMayBeWeakened"}) -public class GridInterruptedException extends IgniteCheckedException { +public class GridInterruptedException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java index 6e8c5bd..473d5b9 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTx.java @@ -225,7 +225,7 @@ public interface GridCacheTx extends GridMetadataAware, AutoCloseable { * * @throws IgniteCheckedException If transaction could not be gracefully ended. */ - @Override public void close() throws IgniteCheckedException; + @Override public void close() throws IgniteException; /** * Asynchronously commits this transaction by initiating {@code two-phase-commit} process. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java index 992f9c7..aa86bb8 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheTxOptimisticException.java @@ -14,7 +14,7 @@ import org.apache.ignite.*; /** * Exception thrown whenever grid transactions fail optimistically. */ -public class GridCacheTxOptimisticException extends IgniteCheckedException { +public class GridCacheTxOptimisticException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheContinuousQuery.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheContinuousQuery.java b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheContinuousQuery.java index a2675aa..16342c8 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheContinuousQuery.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheContinuousQuery.java @@ -330,5 +330,5 @@ public interface GridCacheContinuousQuery<K, V> extends AutoCloseable { * * @throws IgniteCheckedException In case of error. */ - @Override public void close() throws IgniteCheckedException; + @Override public void close() throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java index 9d3b045..743c6c7 100644 --- a/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java +++ b/modules/core/src/main/java/org/gridgain/grid/cache/query/GridCacheQueryFuture.java @@ -25,9 +25,9 @@ public interface GridCacheQueryFuture<T> extends IgniteFuture<Collection<T>> { * be returned from {@link #next()} method without blocking. * * @return Number of fetched elements which are available immediately. - * @throws IgniteCheckedException In case of error. + * @throws IgniteException In case of error. */ - public int available() throws IgniteCheckedException; + public int available() throws IgniteException; /** * Returns next element from result set. @@ -36,9 +36,9 @@ public interface GridCacheQueryFuture<T> extends IgniteFuture<Collection<T>> { * elements available immediately. * * @return Next fetched element or {@code null} if all the elements have been fetched. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - @Nullable public T next() throws IgniteCheckedException; + @Nullable public T next() throws IgniteException; /** * Checks if all data is fetched by the query. @@ -52,7 +52,7 @@ public interface GridCacheQueryFuture<T> extends IgniteFuture<Collection<T>> { * associated with this future. * * @return {@inheritDoc} - * @throws IgniteCheckedException {@inheritDoc} + * @throws IgniteException {@inheritDoc} */ - @Override public boolean cancel() throws IgniteCheckedException; + @Override public boolean cancel() throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopSerialization.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopSerialization.java b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopSerialization.java index 3aa2127..45003a7 100644 --- a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopSerialization.java +++ b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopSerialization.java @@ -42,5 +42,5 @@ public interface GridHadoopSerialization extends AutoCloseable { * * @throws IgniteCheckedException If failed. */ - @Override public void close() throws IgniteCheckedException; + @Override public void close() throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskInput.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskInput.java b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskInput.java index 27f5226..8307390 100644 --- a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskInput.java +++ b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskInput.java @@ -43,5 +43,5 @@ public interface GridHadoopTaskInput extends AutoCloseable { * * @throws IgniteCheckedException If failed. */ - @Override public void close() throws IgniteCheckedException; + @Override public void close() throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskOutput.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskOutput.java b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskOutput.java index b26f8ad..9d25051 100644 --- a/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskOutput.java +++ b/modules/core/src/main/java/org/gridgain/grid/hadoop/GridHadoopTaskOutput.java @@ -28,5 +28,5 @@ public interface GridHadoopTaskOutput extends AutoCloseable { * * @throws IgniteCheckedException If failed. */ - @Override public void close() throws IgniteCheckedException; + @Override public void close() throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterGroupAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterGroupAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterGroupAdapter.java index 47d8d96..e076e7d 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterGroupAdapter.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/ClusterGroupAdapter.java @@ -247,7 +247,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable { } /** {@inheritDoc} */ - @Override public final ClusterMetrics metrics() throws IgniteCheckedException { + @Override public final ClusterMetrics metrics() throws IgniteException { guard(); try { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridComponentType.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridComponentType.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridComponentType.java index a617c99..6d790b7 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridComponentType.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridComponentType.java @@ -132,9 +132,9 @@ public enum GridComponentType { * @param ctx Kernal context. * @param noOp No-op flag. * @return Created component. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - public <T extends GridComponent> T create(GridKernalContext ctx, boolean noOp) throws IgniteCheckedException { + public <T extends GridComponent> T create(GridKernalContext ctx, boolean noOp) throws IgniteException { return create0(ctx, noOp ? noOpClsName : clsName); } @@ -144,10 +144,10 @@ public enum GridComponentType { * @param ctx Kernal context. * @param mandatory If the component is mandatory. * @return Created component. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ public <T extends GridComponent> T createIfInClassPath(GridKernalContext ctx, boolean mandatory) - throws IgniteCheckedException { + throws IgniteException { String cls = clsName; try { @@ -168,9 +168,9 @@ public enum GridComponentType { * * @param noOp No-op flag. * @return Created component. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - public <T> T create(boolean noOp) throws IgniteCheckedException { + public <T> T create(boolean noOp) throws IgniteException { return create0(null, noOp ? noOpClsName : clsName); } @@ -179,9 +179,9 @@ public enum GridComponentType { * * @param ctx Kernal context. * @return Created component or no-op implementation. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - public <T> T createOptional(GridKernalContext ctx) throws IgniteCheckedException { + public <T> T createOptional(GridKernalContext ctx) throws IgniteException { return createOptional0(ctx); } @@ -189,9 +189,9 @@ public enum GridComponentType { * First tries to find main component class, if it is not found creates no-op implementation. * * @return Created component or no-op implementation. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ - public <T> T createOptional() throws IgniteCheckedException { + public <T> T createOptional() throws IgniteException { return createOptional0(null); } @@ -200,10 +200,10 @@ public enum GridComponentType { * * @param ctx Kernal context. * @return Created component or no-op implementation. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ @SuppressWarnings("unchecked") - private <T> T createOptional0(@Nullable GridKernalContext ctx) throws IgniteCheckedException { + private <T> T createOptional0(@Nullable GridKernalContext ctx) throws IgniteException { Class<?> cls; try { @@ -214,7 +214,7 @@ public enum GridComponentType { cls = Class.forName(noOpClsName); } catch (ClassNotFoundException e) { - throw new IgniteCheckedException("Failed to find both real component class and no-op class.", e); + throw new IgniteException("Failed to find both real component class and no-op class.", e); } } @@ -241,10 +241,10 @@ public enum GridComponentType { * @param ctx Kernal context. * @param clsName Component class name. * @return Component instance. - * @throws IgniteCheckedException If failed. + * @throws IgniteException If failed. */ @SuppressWarnings("unchecked") - private <T> T create0(@Nullable GridKernalContext ctx, String clsName) throws IgniteCheckedException { + private <T> T create0(@Nullable GridKernalContext ctx, String clsName) throws IgniteException { try { Class<?> cls = Class.forName(clsName); @@ -268,8 +268,8 @@ public enum GridComponentType { * @param err Creation error. * @return Component creation exception. */ - private IgniteCheckedException componentException(Exception err) { - return new IgniteCheckedException("Failed to create GridGain component (consider adding " + module + + private IgniteException componentException(Exception err) { + return new IgniteException("Failed to create GridGain component (consider adding " + module + " module to classpath) [component=" + this + ", cls=" + clsName + ']', err); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java index 1d9369f..67389ad 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridInternalException.java @@ -17,7 +17,7 @@ import java.io.*; /** * When log debug mode is disabled this exception should be logged in short form - without stack trace. */ -public class GridInternalException extends IgniteCheckedException { +public class GridInternalException extends IgniteException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java index b605753..aae9cda 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobExecuteResponse.java @@ -41,7 +41,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** */ @GridDirectTransient - private IgniteCheckedException gridEx; + private IgniteException gridEx; /** */ private byte[] resBytes; @@ -63,7 +63,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** */ @GridToStringExclude @GridDirectTransient - private IgniteCheckedException fakeEx; + private IgniteException fakeEx; /** * No-op constructor to support {@link Externalizable} interface. This @@ -86,7 +86,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i * @param isCancelled Whether job was cancelled or not. */ public GridJobExecuteResponse(UUID nodeId, IgniteUuid sesId, IgniteUuid jobId, byte[] gridExBytes, - IgniteCheckedException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, + IgniteException gridEx, byte[] resBytes, Object res, byte[] jobAttrsBytes, Map<Object, Object> jobAttrs, boolean isCancelled) { assert nodeId != null; assert sesId != null; @@ -142,7 +142,7 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** * @return Job exception. */ - @Nullable public IgniteCheckedException getException() { + @Nullable public IgniteException getException() { return gridEx; } @@ -177,14 +177,14 @@ public class GridJobExecuteResponse extends GridTcpCommunicationMessageAdapter i /** * @return Fake exception. */ - public IgniteCheckedException getFakeException() { + public IgniteException getFakeException() { return fakeEx; } /** * @param fakeEx Fake exception. */ - public void setFakeException(IgniteCheckedException fakeEx) { + public void setFakeException(IgniteException fakeEx) { this.fakeEx = fakeEx; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java index e2ef4fb..d597808 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobResultImpl.java @@ -38,7 +38,7 @@ public class GridJobResultImpl implements ComputeJobResult { private Object data; /** */ - private IgniteCheckedException ex; + private IgniteException ex; /** */ private boolean hasRes; @@ -97,7 +97,7 @@ public class GridJobResultImpl implements ComputeJobResult { } /** {@inheritDoc} */ - @Override public synchronized IgniteCheckedException getException() { + @Override public synchronized IgniteException getException() { return ex; } @@ -119,7 +119,7 @@ public class GridJobResultImpl implements ComputeJobResult { * @param jobAttrs Job attributes. * @param isCancelled Whether job was cancelled or not. */ - public synchronized void onResponse(@Nullable Object data, @Nullable IgniteCheckedException ex, + public synchronized void onResponse(@Nullable Object data, @Nullable IgniteException ex, @Nullable Map<Object, Object> jobAttrs, boolean isCancelled) { this.data = data; this.ex = ex; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java index 429ad54..f0f6571 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSessionImpl.java @@ -118,9 +118,15 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws IgniteCheckedException { + @Override public Collection<ComputeJobSibling> refreshJobSiblings() throws IgniteException { if (!isTaskNode()) { - Collection<ComputeJobSibling> sibs = ctx.job().requestJobSiblings(this); + Collection<ComputeJobSibling> sibs = null; + try { + sibs = ctx.job().requestJobSiblings(this); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } // Request siblings list from task node (task is continuous). ses.setJobSiblings(sibs); @@ -139,7 +145,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public Collection<ComputeJobSibling> getJobSiblings() throws IgniteCheckedException { + @Override public Collection<ComputeJobSibling> getJobSiblings() throws IgniteException { Collection<ComputeJobSibling> sibs = ses.getJobSiblings(); if (sibs == null) { @@ -153,14 +159,19 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } // Request siblings list from task node (task is continuous). - ses.setJobSiblings(sibs = ctx.job().requestJobSiblings(this)); + try { + ses.setJobSiblings(sibs = ctx.job().requestJobSiblings(this)); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } } return sibs; } /** {@inheritDoc} */ - @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws IgniteCheckedException { + @Override public ComputeJobSibling getJobSibling(IgniteUuid jobId) throws IgniteException { for (ComputeJobSibling sib : getJobSiblings()) if (sib.getJobId().equals(jobId)) return sib; @@ -169,7 +180,7 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttribute(Object key, @Nullable Object val) throws IgniteCheckedException { + @Override public void setAttribute(Object key, @Nullable Object val) throws IgniteException { setAttributes(Collections.singletonMap(key, val)); } @@ -180,11 +191,17 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void setAttributes(Map<?, ?> attrs) throws IgniteCheckedException { + @Override public void setAttributes(Map<?, ?> attrs) throws IgniteException { ses.setAttributes(attrs); - if (!isTaskNode()) - ctx.job().setAttributes(this, attrs); + if (!isTaskNode()) { + try { + ctx.job().setAttributes(this, attrs); + } + catch (IgniteCheckedException e) { + U.wrap(e); + } + } } @@ -226,30 +243,40 @@ public class GridJobSessionImpl implements GridTaskSessionInternal { } /** {@inheritDoc} */ - @Override public void saveCheckpoint(String key, Object state) throws IgniteCheckedException { + @Override public void saveCheckpoint(String key, Object state) throws IgniteException { saveCheckpoint(key, state, ComputeTaskSessionScope.SESSION_SCOPE, 0); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, long timeout) - throws IgniteCheckedException { + throws IgniteException { saveCheckpoint(key, state, scope, timeout, true); } /** {@inheritDoc} */ @Override public void saveCheckpoint(String key, Object state, ComputeTaskSessionScope scope, - long timeout, boolean overwrite) throws IgniteCheckedException { - ses.saveCheckpoint0(this, key, state, scope, timeout, overwrite); + long timeout, boolean overwrite) throws IgniteException { + try { + ses.saveCheckpoint0(this, key, state, scope, timeout, overwrite); + } + catch (IgniteCheckedException e) { + U.wrap(e); + } } /** {@inheritDoc} */ @SuppressWarnings({"unchecked"}) - @Override public <T> T loadCheckpoint(String key) throws IgniteCheckedException { - return ses.loadCheckpoint0(this, key); + @Override public <T> T loadCheckpoint(String key) throws IgniteException { + try { + return ses.loadCheckpoint0(this, key); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } } /** {@inheritDoc} */ - @Override public boolean removeCheckpoint(String key) throws IgniteCheckedException { + @Override public boolean removeCheckpoint(String key) throws IgniteException { return ses.removeCheckpoint0(this, key); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java index c8efde8..f1a705f 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridJobSiblingImpl.java @@ -129,14 +129,20 @@ public class GridJobSiblingImpl extends GridMetadataAwareAdapter implements Comp } /** {@inheritDoc} */ - @Override public void cancel() throws IgniteCheckedException { + @Override public void cancel() throws IgniteException { GridTaskSessionImpl ses = ctx.session().getSession(sesId); if (ses == null) { Collection<ClusterNode> nodes = ctx.discovery().remoteNodes(); - if (!nodes.isEmpty()) - ctx.io().send(nodes, TOPIC_JOB_CANCEL, new GridJobCancelRequest(sesId, jobId), SYSTEM_POOL); + if (!nodes.isEmpty()) { + try { + ctx.io().send(nodes, TOPIC_JOB_CANCEL, new GridJobCancelRequest(sesId, jobId), SYSTEM_POOL); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } + } // Cancel local jobs directly. ctx.job().cancelJob(sesId, jobId, false); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java index 031641f..1f4fb4c 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKernal.java @@ -975,7 +975,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe nodes = metrics.getTotalNodes(); cpus = metrics.getTotalCpus(); } - catch (IgniteCheckedException ignore) { + catch (IgniteException ignore) { } int pubPoolActiveThreads = 0; @@ -2490,7 +2490,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { compute().undeployTask(taskName); } - catch (IgniteCheckedException e) { + catch (IgniteException e) { throw U.jmException(e); } } @@ -2501,7 +2501,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { return compute().<String, String>execute(taskName, arg); } - catch (IgniteCheckedException e) { + catch (IgniteException e) { throw U.jmException(e); } } @@ -2605,7 +2605,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes(File file, boolean restart, - int timeout, int maxConn) throws IgniteCheckedException { + int timeout, int maxConn) throws IgniteException { return startNodesAsync(file, restart, timeout, maxConn).get(); } @@ -2618,14 +2618,20 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe * @throws IgniteCheckedException In case of error. * @see {@link org.apache.ignite.IgniteCluster#startNodes(java.io.File, boolean, int, int)}. */ - IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, int timeout, int maxConn) throws IgniteCheckedException { + IgniteFuture<Collection<GridTuple3<String, Boolean, String>>> startNodesAsync(File file, boolean restart, + int timeout, int maxConn) throws IgniteException { A.notNull(file, "file"); A.ensure(file.exists(), "file doesn't exist."); A.ensure(file.isFile(), "file is a directory."); - IgniteBiTuple<Collection<Map<String, Object>>, Map<String, Object>> t = parseFile(file); + try { + IgniteBiTuple<Collection<Map<String, Object>>, Map<String, Object>> t = parseFile(file); - return startNodesAsync(t.get1(), t.get2(), restart, timeout, maxConn); + return startNodesAsync(t.get1(), t.get2(), restart, timeout, maxConn); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } } /** {@inheritDoc} */ @@ -2646,8 +2652,13 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public Collection<GridTuple3<String, Boolean, String>> startNodes( Collection<Map<String, Object>> hosts, @Nullable Map<String, Object> dflts, boolean restart, int timeout, - int maxConn) throws IgniteCheckedException { - return startNodesAsync(hosts, dflts, restart, timeout, maxConn).get(); + int maxConn) throws IgniteException { + try { + return startNodesAsync(hosts, dflts, restart, timeout, maxConn).get(); + } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } } /** @@ -2818,7 +2829,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void stopNodes() throws IgniteCheckedException { + @Override public void stopNodes() throws IgniteException { guard(); try { @@ -2830,7 +2841,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void stopNodes(Collection<UUID> ids) throws IgniteCheckedException { + @Override public void stopNodes(Collection<UUID> ids) throws IgniteException { guard(); try { @@ -2842,7 +2853,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void restartNodes() throws IgniteCheckedException { + @Override public void restartNodes() throws IgniteException { guard(); try { @@ -2854,7 +2865,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe } /** {@inheritDoc} */ - @Override public void restartNodes(Collection<UUID> ids) throws IgniteCheckedException { + @Override public void restartNodes(Collection<UUID> ids) throws IgniteException { guard(); try { @@ -3089,7 +3100,7 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe /** {@inheritDoc} */ @Override public <K> Map<ClusterNode, Collection<K>> mapKeysToNodes(String cacheName, - @Nullable Collection<? extends K> keys) throws IgniteCheckedException { + @Nullable Collection<? extends K> keys) throws IgniteException { if (F.isEmpty(keys)) return Collections.emptyMap(); @@ -3098,13 +3109,16 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { return ctx.affinity().mapKeysToNodes(cacheName, keys); } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } finally { unguard(); } } /** {@inheritDoc} */ - @Nullable @Override public <K> ClusterNode mapKeyToNode(String cacheName, K key) throws IgniteCheckedException { + @Nullable @Override public <K> ClusterNode mapKeyToNode(String cacheName, K key) throws IgniteException { A.notNull(key, "key"); guard(); @@ -3112,6 +3126,9 @@ public class GridKernal extends ClusterGroupAdapter implements GridEx, IgniteMBe try { return ctx.affinity().mapKeyToNode(cacheName, key); } + catch (IgniteCheckedException e) { + throw U.wrap(e); + } finally { unguard(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java index cca5988..bdfb7c9 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridKillTask.java @@ -33,7 +33,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, Boolean restart) - throws IgniteCheckedException { + throws IgniteException { assert restart != null; this.restart = restart; @@ -63,7 +63,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { } /** {@inheritDoc} */ - @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException { + @Override public Void reduce(List<ComputeJobResult> results) throws IgniteException { return null; } @@ -75,7 +75,7 @@ class GridKillTask extends ComputeTaskAdapter<Boolean, Void> { private static final long serialVersionUID = 0L; /** {@inheritDoc} */ - @Override public Object execute() throws IgniteCheckedException { + @Override public Object execute() throws IgniteException { if (restart) new Thread(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java index 065488b..c59f866 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridLoggerProxy.java @@ -80,12 +80,12 @@ public class GridLoggerProxy extends GridMetadataAwareAdapter implements IgniteL } /** {@inheritDoc} */ - @Override public void start() throws IgniteCheckedException { + @Override public void start() throws IgniteException { U.startLifecycleAware(Collections.singleton(impl)); } /** {@inheritDoc} */ - @Override public void stop() throws IgniteCheckedException { + @Override public void stop() throws IgniteException { U.stopLifecycleAware(this, Collections.singleton(impl)); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8bc850c2/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java index 77cb10e..16ef309 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridTaskFutureImpl.java @@ -67,7 +67,7 @@ public class GridTaskFutureImpl<R> extends GridFutureAdapter<R> implements Compu } /** {@inheritDoc} */ - @Override public boolean cancel() throws IgniteCheckedException { + @Override public boolean cancel() throws IgniteException { ctx.security().authorize(ses.getTaskName(), GridSecurityPermission.TASK_CANCEL, null); checkValid();