http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java index bc0160a,dfbfbfa..4d75ece --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java @@@ -140,41 -138,41 +140,56 @@@ class GridTaskWorker<T, R> extends Grid /** Continuous mapper. */ private final ComputeTaskContinuousMapper mapper = new ComputeTaskContinuousMapper() { /** {@inheritDoc} */ -- @Override public void send(ComputeJob job, ClusterNode node) throws IgniteCheckedException { -- A.notNull(job, "job"); -- A.notNull(node, "node"); ++ @Override public void send(ComputeJob job, ClusterNode node) { ++ try { ++ A.notNull(job, "job"); ++ A.notNull(node, "node"); -- processMappedJobs(Collections.singletonMap(job, node)); ++ processMappedJobs(Collections.singletonMap(job, node)); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ -- @Override public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) throws IgniteCheckedException { -- A.notNull(mappedJobs, "mappedJobs"); ++ @Override public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) { ++ try { ++ A.notNull(mappedJobs, "mappedJobs"); -- processMappedJobs(mappedJobs); ++ processMappedJobs(mappedJobs); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ -- @Override public void send(ComputeJob job) throws IgniteCheckedException { ++ @Override public void send(ComputeJob job) { A.notNull(job, "job"); send(Collections.singleton(job)); } /** {@inheritDoc} */ -- @Override public void send(Collection<? extends ComputeJob> jobs) throws IgniteCheckedException { -- A.notNull(jobs, "jobs"); ++ @Override public void send(Collection<? extends ComputeJob> jobs) { ++ try { ++ A.notNull(jobs, "jobs"); -- if (jobs.isEmpty()) -- throw new IgniteCheckedException("Empty jobs collection passed to send(...) method."); ++ if (jobs.isEmpty()) ++ throw new IgniteException("Empty jobs collection passed to send(...) method."); -- ComputeLoadBalancer balancer = ctx.loadBalancing().getLoadBalancer(ses, getTaskTopology()); ++ ComputeLoadBalancer balancer = ctx.loadBalancing().getLoadBalancer(ses, getTaskTopology()); -- for (ComputeJob job : jobs) { -- if (job == null) -- throw new IgniteCheckedException("Null job passed to send(...) method."); ++ for (ComputeJob job : jobs) { ++ if (job == null) ++ throw new IgniteException("Null job passed to send(...) method."); -- processMappedJobs(Collections.singletonMap(job, balancer.getBalancedNode(job, null))); ++ processMappedJobs(Collections.singletonMap(job, balancer.getBalancedNode(job, null))); ++ } ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); } } }; @@@ -426,7 -424,7 +441,7 @@@ finishTask(null, e); } -- catch (IgniteCheckedException e) { ++ catch (IgniteException | IgniteCheckedException e) { if (!fut.isCancelled()) { U.error(log, "Failed to map task jobs to nodes: " + ses, e); @@@ -672,8 -670,8 +687,8 @@@ Object res0 = loc ? res.getJobResult() : marsh.unmarshal(res.getJobResultBytes(), clsLdr); -- IgniteCheckedException ex = loc ? res.getException() : -- marsh.<IgniteCheckedException>unmarshal(res.getExceptionBytes(), clsLdr); ++ IgniteException ex = loc ? res.getException() : ++ marsh.<IgniteException>unmarshal(res.getExceptionBytes(), clsLdr); Map<Object, Object> attrs = loc ? res.getJobAttributes() : marsh.<Map<Object, Object>>unmarshal(res.getJobAttributesBytes(), clsLdr); @@@ -814,7 -812,7 +829,7 @@@ plc = task.result(jobRes, results); if (plc == FAILOVER && noFailover) { -- IgniteCheckedException e = jobRes.getException(); ++ IgniteException e = jobRes.getException(); if (e != null) throw e; @@@ -832,51 -830,51 +847,26 @@@ return plc; } -- catch (IgniteCheckedException e) { -- if (X.hasCause(e, GridInternalException.class) || -- X.hasCause(e, IgniteFsOutOfSpaceException.class)) { -- // Print internal exceptions only if debug is enabled. -- if (log.isDebugEnabled()) -- U.error(log, "Failed to obtain remote job result policy for result from " + -- "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); -- } -- else if (X.hasCause(e, ComputeJobFailoverException.class)) { -- IgniteCheckedException e0 = new IgniteCheckedException(" Job was not failed over because " + -- "GridComputeJobResultPolicy.FAILOVER was not returned from " + -- "GridTask.result(...) method for job result with GridComputeJobFailoverException.", e); -- -- finishTask(null, e0); -- -- return null; -- } -- else -- U.error(log, "Failed to obtain remote job result policy for result from " + -- "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); -- -- finishTask(null, e); -- -- return null; -- } catch (IgniteException e) { if (X.hasCause(e, GridInternalException.class) || X.hasCause(e, IgniteFsOutOfSpaceException.class)) { // Print internal exceptions only if debug is enabled. if (log.isDebugEnabled()) U.error(log, "Failed to obtain remote job result policy for result from " + -- "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); ++ "ComputeTask.result(..) method (will fail the whole task): " + jobRes, e); } else if (X.hasCause(e, ComputeJobFailoverException.class)) { IgniteCheckedException e0 = new IgniteCheckedException(" Job was not failed over because " + -- "GridComputeJobResultPolicy.FAILOVER was not returned from " + -- "GridTask.result(...) method for job result with GridComputeJobFailoverException.", e); ++ "ComputeJobResultPolicy.FAILOVER was not returned from " + ++ "ComputeTask.result(...) method for job result with GridComputeJobFailoverException.", e); finishTask(null, e0); return null; } else -- U.error(log, "Failed to obtain remote job result policy for result from" + -- "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); ++ U.error(log, "Failed to obtain remote job result policy for result from " + ++ "ComputeTask.result(..) method (will fail the whole task): " + jobRes, e); finishTask(null, e); @@@ -1179,10 -1177,10 +1169,10 @@@ res.getJobContext().getJobId(), null, null, null, null, null, null, false); if (deadNode) - fakeRes.setFakeException(new ClusterTopologyCheckedException("Failed to send job due to node failure: " + + fakeRes.setFakeException(new ClusterTopologyException("Failed to send job due to node failure: " + node, e)); else -- fakeRes.setFakeException(e); ++ fakeRes.setFakeException(new IgniteException(e)); onResponse(fakeRes); }
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java index fdb769d,fedf24b..e6396ff --- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java @@@ -9140,29 -9138,4 +9140,31 @@@ public abstract class IgniteUtils return sb.toString(); } + + /** + * @param e Ingite checked exception. + * @return Ignite runtime exception. + */ + public static IgniteException convertException(IgniteCheckedException e) { + if (e instanceof IgniteInterruptedCheckedException) + return new IgniteInterruptedException(e.getMessage(), (InterruptedException)e.getCause()); + else if (e instanceof IgniteFutureCancelledCheckedException) + return new IgniteFutureCancelledException(e.getMessage(), e.getCause()); + else if (e instanceof IgniteFutureTimeoutCheckedException) + return new IgniteFutureTimeoutException(e.getMessage(), e.getCause()); + else if (e instanceof ClusterGroupEmptyCheckedException) + return new ClusterGroupEmptyException(e.getMessage(), e.getCause()); + else if (e instanceof ClusterTopologyCheckedException) + return new ClusterTopologyException(e.getMessage(), e.getCause()); + else if (e instanceof IgniteDeploymentCheckedException) + return new IgniteDeploymentException(e.getMessage(), e.getCause()); + else if (e instanceof ComputeTaskTimeoutCheckedException) + return new ComputeTaskTimeoutException(e.getMessage(), e.getCause()); ++ else if (e instanceof ComputeTaskCancelledCheckedException) ++ return new ComputeTaskCancelledException(e.getMessage(), e.getCause()); + else if (e.getCause() instanceof IgniteException) + return (IgniteException)e.getCause(); + + return new IgniteException(e); + } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFinishedFutureImplEx.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFinishedFutureImplEx.java index 0000000,0000000..6d633f5 new file mode 100644 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFinishedFutureImplEx.java @@@ -1,0 -1,0 +1,30 @@@ ++/* ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to You under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++package org.apache.ignite.internal.util.future; ++ ++/** ++ * ++ */ ++public class IgniteFinishedFutureImplEx<V> extends IgniteFutureImpl<V> { ++ /** ++ * @param res Object res. ++ */ ++ public IgniteFinishedFutureImplEx(V res) { ++ super(new GridFinishedFutureEx<>(res)); ++ } ++} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java index 8c24cba,0000000..ddf9e2d mode 100644,000000..100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/IgniteFutureImpl.java @@@ -1,209 -1,0 +1,219 @@@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.util.future; + +import org.apache.ignite.*; +import org.apache.ignite.internal.*; +import org.apache.ignite.internal.util.lang.*; +import org.apache.ignite.internal.util.typedef.*; +import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.lang.*; +import org.jetbrains.annotations.*; + +import java.util.concurrent.*; + +/** + * Implementation of public API future. + */ +public class IgniteFutureImpl<V> implements IgniteFuture<V> { + /** */ + protected final IgniteInternalFuture<V> fut; + + /** + * @param fut Future. + */ + public IgniteFutureImpl(IgniteInternalFuture<V> fut) { + assert fut != null; + + this.fut = fut; + } + + /** + * @return Internal future. + */ + public IgniteInternalFuture<V> internalFuture() { + return fut; + } + + /** {@inheritDoc} */ + @Override public long startTime() { + return fut.startTime(); + } + + /** {@inheritDoc} */ + @Override public long duration() { + return fut.duration(); + } + + /** {@inheritDoc} */ + @Override public void syncNotify(boolean syncNotify) { + fut.syncNotify(syncNotify); + } + + /** {@inheritDoc} */ + @Override public boolean syncNotify() { + return fut.syncNotify(); + } + + /** {@inheritDoc} */ + @Override public void concurrentNotify(boolean concurNotify) { + fut.concurrentNotify(concurNotify); + } + + /** {@inheritDoc} */ + @Override public boolean concurrentNotify() { + return fut.concurrentNotify(); + } + + /** {@inheritDoc} */ + @Override public boolean isCancelled() { + return fut.isCancelled(); + } + + /** {@inheritDoc} */ + @Override public boolean isDone() { + return fut.isDone(); + } + + /** {@inheritDoc} */ + @Override public void listenAsync(@Nullable final IgniteInClosure<? super IgniteFuture<V>> lsnr) { + if (lsnr != null) + fut.listenAsync(new InternalFutureListener(lsnr)); + } + + /** {@inheritDoc} */ + @Override public void stopListenAsync(IgniteInClosure<? super IgniteFuture<V>>... lsnrs) { + for (IgniteInClosure<? super IgniteFuture<V>> lsnr : lsnrs) { + if (lsnr != null) + fut.stopListenAsync(new InternalFutureListener(lsnr)); + } + } + + /** {@inheritDoc} */ + @Override public <T> IgniteFuture<T> chain(final IgniteClosure<? super IgniteFuture<V>, T> doneCb) { + IgniteInternalFuture<T> fut0 = fut.chain(new C1<IgniteInternalFuture<V>, T>() { + @Override public T apply(IgniteInternalFuture<V> fut) { + assert IgniteFutureImpl.this.fut == fut; + + try { + return doneCb.apply(IgniteFutureImpl.this); + } + catch (Exception e) { + throw new GridClosureException(e); + } + } + }); + + return new IgniteFutureImpl<>(fut0); + } + + /** {@inheritDoc} */ + @Override public boolean cancel() throws IgniteException { + try { + return fut.cancel(); + } + catch (IgniteCheckedException e) { + throw U.convertException(e); + } + } + + /** {@inheritDoc} */ + @Override public boolean cancel(boolean mayInterruptIfRunning) { + return mayInterruptIfRunning && cancel(); + } + + /** {@inheritDoc} */ + @Override public V get() { + try { + return fut.get(); + } + catch (IgniteCheckedException e) { + throw U.convertException(e); + } + } + + /** {@inheritDoc} */ ++ @Override public V get(long timeout) { ++ try { ++ return fut.get(timeout); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } ++ } ++ ++ /** {@inheritDoc} */ + @Override public V get(long timeout, TimeUnit unit) { + try { + return fut.get(timeout, unit); + } + catch (IgniteCheckedException e) { + throw U.convertException(e); + } + } + + /** {@inheritDoc} */ + @Override public String toString() { + return "IgniteFuture [orig=" + fut + ']'; + } + + /** + * + */ + private class InternalFutureListener implements IgniteInClosure<IgniteInternalFuture<V>> { + /** */ + private final IgniteInClosure<? super IgniteFuture<V>> lsnr; + + /** + * @param lsnr Wrapped listener. + */ + private InternalFutureListener(IgniteInClosure<? super IgniteFuture<V>> lsnr) { + assert lsnr != null; + + this.lsnr = lsnr; + } + + /** {@inheritDoc} */ + @Override public int hashCode() { + return lsnr.hashCode(); + } + + /** {@inheritDoc} */ + @SuppressWarnings("unchecked") + @Override public boolean equals(Object obj) { + if (obj == null || !obj.getClass().equals(InternalFutureListener.class)) + return false; + + InternalFutureListener lsnr0 = (InternalFutureListener)obj; + + return lsnr.equals(lsnr0.lsnr); + } + + /** {@inheritDoc} */ + @Override public void apply(IgniteInternalFuture<V> fut) { + assert IgniteFutureImpl.this.fut == fut; + + lsnr.apply(IgniteFutureImpl.this); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return lsnr.toString(); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyArgumentBuilder.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyArgumentBuilder.java index 1f4e784,1f4e784..1a0edb2 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyArgumentBuilder.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyArgumentBuilder.java @@@ -152,9 -152,9 +152,9 @@@ public final class GridifyArgumentBuild * @param arg Task argument contains all necessary data for method invoke. * @param input Input collection used in job. * @return Argument for job. -- * @throws IgniteCheckedException In case of error. ++ * @throws IgniteException In case of error. */ -- public GridifyArgument createJobArgument(GridifyRangeArgument arg, Collection<?> input) throws IgniteCheckedException { ++ public GridifyArgument createJobArgument(GridifyRangeArgument arg, Collection<?> input) throws IgniteException { GridifyArgumentAdapter res = new GridifyArgumentAdapter(); res.setTarget(arg.getTarget()); @@@ -177,7 -177,7 +177,7 @@@ Object paramValue = GridifyUtils.collectionToParameter(paramCls, input); if (paramValue == null) -- throw new IgniteCheckedException("Failed to create job argument for type: " + paramCls.getName()); ++ throw new IgniteException("Failed to create job argument for type: " + paramCls.getName()); mtdArgs[arg.getParamIndex()] = paramValue; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyJobAdapter.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyJobAdapter.java index 8337b6c,8337b6c..93b9eae --- a/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyJobAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/gridify/GridifyJobAdapter.java @@@ -62,9 -62,9 +62,8 @@@ public class GridifyJobAdapter extends * out of this method. * * @return {@inheritDoc} -- * @throws IgniteCheckedException {@inheritDoc} */ -- @Override public Object execute() throws IgniteCheckedException { ++ @Override public Object execute() { GridifyArgument arg = argument(0); try { @@@ -78,7 -78,7 +77,7 @@@ mtd.setAccessible(true); } catch (SecurityException e) { -- throw new IgniteCheckedException("Got security exception when attempting to soften access control for " + ++ throw new IgniteException("Got security exception when attempting to soften access control for " + "@Gridify method: " + mtd, e); } @@@ -92,16 -92,16 +91,16 @@@ return mtd.invoke(obj, arg.getMethodParameters()); } catch (InvocationTargetException e) { -- if (e.getTargetException() instanceof IgniteCheckedException) -- throw (IgniteCheckedException)e.getTargetException(); ++ if (e.getTargetException() instanceof IgniteException) ++ throw (IgniteException)e.getTargetException(); -- throw new IgniteCheckedException("Failed to invoke a method due to user exception.", e.getTargetException()); ++ throw new IgniteException("Failed to invoke a method due to user exception.", e.getTargetException()); } catch (IllegalAccessException e) { -- throw new IgniteCheckedException("Failed to access method for execution.", e); ++ throw new IgniteException("Failed to access method for execution.", e); } catch (NoSuchMethodException e) { -- throw new IgniteCheckedException("Failed to find method for execution.", e); ++ throw new IgniteException("Failed to find method for execution.", e); } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridComputeJobWrapper.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridComputeJobWrapper.java index 3636ac7,3636ac7..b77da7d --- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridComputeJobWrapper.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridComputeJobWrapper.java @@@ -60,8 -60,8 +60,7 @@@ public class GridComputeJobWrapper impl } /** {@inheritDoc} */ -- @Nullable -- @Override public final Object call() throws Exception { ++ @Nullable @Override public final Object call() throws Exception { return execute(); } @@@ -87,7 -87,7 +86,7 @@@ } /** {@inheritDoc} */ -- @Override public Object execute() throws IgniteCheckedException { ++ @Override public Object execute() { return job.execute(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java index c4bd2f1,c21bf5f..a45398a --- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java @@@ -500,13 -500,13 +500,6 @@@ public class GridFunc }; /** */ -- private static final IgnitePredicate<IgniteInternalFuture<?>> FINISHED_FUTURE = new IgnitePredicate<IgniteInternalFuture<?>>() { -- @Override public boolean apply(IgniteInternalFuture<?> f) { -- return f.isDone(); -- } -- }; -- -- /** */ private static final IgnitePredicate<IgniteInternalFuture<?>> UNFINISHED_FUTURE = new IgnitePredicate<IgniteInternalFuture<?>>() { @Override public boolean apply(IgniteInternalFuture<?> f) { return !f.isDone(); @@@ -8590,15 -8590,15 +8583,6 @@@ } /** -- * Returns predicate for filtering finished futures. -- * -- * @return Predicate for filtering finished futures. -- */ -- public static IgnitePredicate<IgniteInternalFuture<?>> finishedFutures() { -- return FINISHED_FUTURE; -- } -- -- /** * Returns predicate for filtering unfinished futures. * * @return Predicate for filtering unfinished futures. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/X.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/util/typedef/X.java index 9695249,9695249..a6c1b07 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/X.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/typedef/X.java @@@ -18,9 -18,9 +18,9 @@@ package org.apache.ignite.internal.util.typedef; import org.apache.ignite.*; --import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.internal.*; ++import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; import java.io.*; @@@ -821,11 -821,11 +821,11 @@@ public final class X * @param futs Futures to wait for. * @throws IgniteCheckedException If any of the futures threw exception. */ -- public static void waitAll(@Nullable Iterable<IgniteInternalFuture<?>> futs) throws IgniteCheckedException { ++ public static void waitAll(@Nullable Iterable<IgniteFuture<?>> futs) throws IgniteCheckedException { if (F.isEmpty(futs)) return; -- for (IgniteInternalFuture fut : futs) ++ for (IgniteFuture fut : futs) fut.get(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java index 0950a4e,0950a4e..d175371 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorJob.java @@@ -51,7 -51,7 +51,7 @@@ public abstract class VisorJob<A, R> ex } /** {@inheritDoc} */ -- @Nullable @Override public Object execute() throws IgniteCheckedException { ++ @Nullable @Override public Object execute() { start = U.currentTimeMillis(); A arg = argument(0); @@@ -71,7 -71,7 +71,8 @@@ /** * Execution logic of concrete task. * ++ * @param arg Task argument. * @return Result. */ -- protected abstract R run(@Nullable A arg) throws IgniteCheckedException; ++ protected abstract R run(@Nullable A arg) throws IgniteException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java index 16ead12,16ead12..4154972 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorMultiNodeTask.java @@@ -55,8 -55,8 +55,7 @@@ public abstract class VisorMultiNodeTas protected abstract VisorJob<A, J> job(A arg); /** {@inheritDoc} */ -- @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, VisorTaskArgument<A> arg) -- throws IgniteCheckedException { ++ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, VisorTaskArgument<A> arg) { assert arg != null; start = U.currentTimeMillis(); @@@ -79,8 -79,8 +78,7 @@@ * @return Map of grid jobs assigned to subgrid node. * @throws IgniteCheckedException If mapping could not complete successfully. */ -- protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid, VisorTaskArgument<A> arg) -- throws IgniteCheckedException { ++ protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid, VisorTaskArgument<A> arg) { Collection<UUID> nodeIds = arg.nodes(); Map<ComputeJob, ClusterNode> map = U.newHashMap(nodeIds.size()); @@@ -99,8 -99,8 +97,7 @@@ } /** {@inheritDoc} */ -- @Override public ComputeJobResultPolicy result(ComputeJobResult res, -- List<ComputeJobResult> rcvd) throws IgniteCheckedException { ++ @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) { // All Visor tasks should handle exceptions in reduce method. return ComputeJobResultPolicy.WAIT; } @@@ -110,12 -110,12 +107,12 @@@ * * @param results Job results. * @return Task result. -- * @throws IgniteCheckedException If reduction or results caused an error. ++ * @throws IgniteException If reduction or results caused an error. */ -- @Nullable protected abstract R reduce0(List<ComputeJobResult> results) throws IgniteCheckedException; ++ @Nullable protected abstract R reduce0(List<ComputeJobResult> results) throws IgniteException; /** {@inheritDoc} */ -- @Nullable @Override public final R reduce(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override public final R reduce(List<ComputeJobResult> results) { try { return reduce0(results); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorOneNodeTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/VisorOneNodeTask.java index fe63343,fe63343..ad5ca19 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorOneNodeTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/VisorOneNodeTask.java @@@ -29,7 -29,7 +29,7 @@@ import java.util.* */ public abstract class VisorOneNodeTask<A, R> extends VisorMultiNodeTask<A, R, R> { /** {@inheritDoc} */ -- @Nullable @Override protected R reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected R reduce0(List<ComputeJobResult> results) { assert results.size() == 1; ComputeJobResult res = F.first(results); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java index b59a3ff,b59a3ff..5f97e3e --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheClearTask.java @@@ -57,7 -57,7 +57,7 @@@ public class VisorCacheClearTask extend } /** {@inheritDoc} */ -- @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> arg) throws IgniteCheckedException { ++ @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> arg) { Map<String, IgniteBiTuple<Integer, Integer>> res = new HashMap<>(); for(GridCache cache : g.cachesx()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java index 6a28a73,6a28a73..efb504f --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheCompactTask.java @@@ -55,27 -55,27 +55,32 @@@ public class VisorCacheCompactTask exte } /** {@inheritDoc} */ -- @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> names) throws IgniteCheckedException { -- final Map<String, IgniteBiTuple<Integer, Integer>> res = new HashMap<>(); ++ @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> names) { ++ try { ++ final Map<String, IgniteBiTuple<Integer, Integer>> res = new HashMap<>(); -- for(GridCache cache : g.cachesx()) { -- String cacheName = cache.name(); ++ for(GridCache cache : g.cachesx()) { ++ String cacheName = cache.name(); -- if (names.contains(cacheName)) { -- final Set keys = cache.keySet(); ++ if (names.contains(cacheName)) { ++ final Set keys = cache.keySet(); -- int before = keys.size(), after = before; ++ int before = keys.size(), after = before; -- for (Object key : keys) { -- if (cache.compact(key)) -- after--; -- } ++ for (Object key : keys) { ++ if (cache.compact(key)) ++ after--; ++ } -- res.put(cacheName, new IgniteBiTuple<>(before, after)); ++ res.put(cacheName, new IgniteBiTuple<>(before, after)); ++ } } -- } -- return res; ++ return res; ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java index e946d06,e946d06..60ec5d0 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheLoadTask.java @@@ -56,28 -56,28 +56,33 @@@ public class VisorCacheLoadTask extend } /** {@inheritDoc} */ -- @Override protected Map<String, Integer> run(GridTuple3<Set<String>, Long, Object[]> arg) throws IgniteCheckedException { -- Set<String> cacheNames = arg.get1(); -- Long ttl = arg.get2(); -- Object[] loaderArgs = arg.get3(); ++ @Override protected Map<String, Integer> run(GridTuple3<Set<String>, Long, Object[]> arg) { ++ try { ++ Set<String> cacheNames = arg.get1(); ++ Long ttl = arg.get2(); ++ Object[] loaderArgs = arg.get3(); -- Map<String, Integer> res = new HashMap<>(); ++ Map<String, Integer> res = new HashMap<>(); -- for (GridCache c: g.cachesx()) { -- String cacheName = c.name(); ++ for (GridCache c: g.cachesx()) { ++ String cacheName = c.name(); -- if (cacheNames.contains(cacheName)) { -- c.loadCache(new P2<Object, Object>() { -- @Override public boolean apply(Object o, Object o2) { -- return true; -- } -- }, ttl, loaderArgs); ++ if (cacheNames.contains(cacheName)) { ++ c.loadCache(new P2<Object, Object>() { ++ @Override public boolean apply(Object o, Object o2) { ++ return true; ++ } ++ }, ttl, loaderArgs); -- res.put(cacheName, c.size()); // Put new key size for successfully loaded cache. ++ res.put(cacheName, c.size()); // Put new key size for successfully loaded cache. ++ } } -- } -- return res; ++ return res; ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java index 489e225,489e225..dbc54ff --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetadataTask.java @@@ -56,16 -56,16 +56,21 @@@ public class VisorCacheMetadataTask ext } /** {@inheritDoc} */ -- @Override protected GridCacheSqlMetadata run(String cacheName) throws IgniteCheckedException { -- GridCache<Object, Object> cache = g.cachex(cacheName); ++ @Override protected GridCacheSqlMetadata run(String cacheName) { ++ try { ++ GridCache<Object, Object> cache = g.cachex(cacheName); -- if (cache != null) { -- GridCacheQueriesEx<Object, Object> queries = (GridCacheQueriesEx<Object, Object>) cache.queries(); ++ if (cache != null) { ++ GridCacheQueriesEx<Object, Object> queries = (GridCacheQueriesEx<Object, Object>) cache.queries(); -- return F.first(queries.sqlMetadata()); -- } ++ return F.first(queries.sqlMetadata()); ++ } -- throw new IgniteCheckedException("Cache not found: " + escapeName(cacheName)); ++ throw new IgniteException("Cache not found: " + escapeName(cacheName)); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java index 273a61c,273a61c..6c22d37 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheMetricsCollectorTask.java @@@ -44,8 -44,8 +44,7 @@@ public class VisorCacheMetricsCollector } /** {@inheritDoc} */ -- @Nullable @Override protected Iterable<VisorCacheAggregatedMetrics> reduce0(List<ComputeJobResult> results) -- throws IgniteCheckedException { ++ @Nullable @Override protected Iterable<VisorCacheAggregatedMetrics> reduce0(List<ComputeJobResult> results) { Map<String, VisorCacheAggregatedMetrics> grpAggrMetrics = U.newHashMap(results.size()); for (ComputeJobResult res : results) { @@@ -89,7 -89,7 +88,7 @@@ /** {@inheritDoc} */ @Override protected Map<String, VisorCacheMetrics> -- run(IgniteBiTuple<Boolean, String> arg) throws IgniteCheckedException { ++ run(IgniteBiTuple<Boolean, String> arg) { Collection<? extends GridCache<?, ?>> caches = arg.get1() ? g.cachesx() : F.asList(g.cachex(arg.get2())); if (caches != null) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java index 8b7c446,8b7c446..7b3de9c --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCachePreloadTask.java @@@ -55,18 -55,18 +55,23 @@@ public class VisorCachePreloadTask exte } /** {@inheritDoc} */ -- @Override protected Void run(Set<String> cacheNames) throws IgniteCheckedException { -- Collection<IgniteInternalFuture<?>> futs = new ArrayList<>(); ++ @Override protected Void run(Set<String> cacheNames) { ++ try { ++ Collection<IgniteInternalFuture<?>> futs = new ArrayList<>(); -- for(GridCache c : g.cachesx()) { -- if (cacheNames.contains(c.name())) -- futs.add(c.forceRepartition()); -- } ++ for(GridCache c : g.cachesx()) { ++ if (cacheNames.contains(c.name())) ++ futs.add(c.forceRepartition()); ++ } -- for (IgniteInternalFuture f: futs) -- f.get(); ++ for (IgniteInternalFuture f: futs) ++ f.get(); -- return null; ++ return null; ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java index b445034,b445034..cce4654 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheResetMetricsTask.java @@@ -52,7 -52,7 +52,7 @@@ public class VisorCacheResetMetricsTas } /** {@inheritDoc} */ -- @Override protected Void run(String cacheName) throws IgniteCheckedException { ++ @Override protected Void run(String cacheName) { GridCache cache = g.cachex(cacheName); if (cache != null) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java index 23ba94f,23ba94f..72b59df --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheSwapBackupsTask.java @@@ -59,7 -59,7 +59,7 @@@ public class VisorCacheSwapBackupsTask } /** {@inheritDoc} */ -- @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> names) throws IgniteCheckedException { ++ @Override protected Map<String, IgniteBiTuple<Integer, Integer>> run(Set<String> names) { Map<String, IgniteBiTuple<Integer, Integer>> total = new HashMap<>(); for (GridCache c: g.cachesx()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java index efaf5da,efaf5da..bc29729 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeCancelSessionsTask.java @@@ -41,7 -41,7 +41,7 @@@ public class VisorComputeCancelSessions } /** {@inheritDoc} */ -- @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) { // No-op, just awaiting all jobs done. return null; } @@@ -62,7 -62,7 +62,7 @@@ } /** {@inheritDoc} */ -- @Override protected Void run(Map<UUID, Set<IgniteUuid>> arg) throws IgniteCheckedException { ++ @Override protected Void run(Map<UUID, Set<IgniteUuid>> arg) { Set<IgniteUuid> sesIds = arg.get(g.localNode().id()); if (sesIds != null && !sesIds.isEmpty()) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java index e401e05,e401e05..8125252 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeResetMetricsTask.java @@@ -51,7 -51,7 +51,7 @@@ public class VisorComputeResetMetricsTa } /** {@inheritDoc} */ -- @Override protected Void run(Void arg) throws IgniteCheckedException { ++ @Override protected Void run(Void arg) { g.resetMetrics(); return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java index 8d31d3b,8d31d3b..30d876a --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/compute/VisorComputeToggleMonitoringTask.java @@@ -41,7 -41,7 +41,7 @@@ public class VisorComputeToggleMonitori private static final long serialVersionUID = 0L; /** {@inheritDoc} */ -- @Nullable @Override protected Boolean reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected Boolean reduce0(List<ComputeJobResult> results) { Collection<Boolean> toggles = new HashSet<>(); for (ComputeJobResult res: results) @@@ -72,7 -72,7 +72,7 @@@ } /** {@inheritDoc} */ -- @Override protected Boolean run(IgniteBiTuple<String, Boolean> arg) throws IgniteCheckedException { ++ @Override protected Boolean run(IgniteBiTuple<String, Boolean> arg) { if (checkExplicitTaskMonitoring(g)) return true; else { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadDumpTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadDumpTask.java index 7a7b5aa,7a7b5aa..90ed33c --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadDumpTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadDumpTask.java @@@ -54,7 -54,7 +54,7 @@@ public class VisorThreadDumpTask extend } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<VisorThreadInfo[], long[]> run(Void arg) throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<VisorThreadInfo[], long[]> run(Void arg) { ThreadMXBean mx = U.getThreadMx(); ThreadInfo[] info = mx.dumpAllThreads(true, true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java index 143c88f,143c88f..e166bbe --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java @@@ -99,7 -99,7 +99,7 @@@ public class VisorFileBlockTask extend } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<? extends IOException, VisorFileBlock> run(VisorFileBlockArg arg) throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<? extends IOException, VisorFileBlock> run(VisorFileBlockArg arg) { try { URL url = U.resolveGridGainUrl(arg.path); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java index 096c9f0,096c9f0..3679ebf --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java @@@ -60,7 -60,7 +60,7 @@@ public class VisorLatestTextFilesTask e } /** {@inheritDoc} */ -- @Nullable @Override protected Collection<VisorLogFile> run(final IgniteBiTuple<String, String> arg) throws IgniteCheckedException { ++ @Nullable @Override protected Collection<VisorLogFile> run(final IgniteBiTuple<String, String> arg) { String path = arg.get1(); String regexp = arg.get2(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java index cc2e2f6,cc2e2f6..3699386 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsFormatTask.java @@@ -51,12 -51,12 +51,12 @@@ public class VisorGgfsFormatTask extend } /** {@inheritDoc} */ -- @Override protected Void run(String ggfsName) throws IgniteCheckedException { ++ @Override protected Void run(String ggfsName) { try { g.fileSystem(ggfsName).format(); } catch (IllegalArgumentException iae) { -- throw new IgniteCheckedException("Failed to format GGFS: " + ggfsName, iae); ++ throw new IgniteException("Failed to format IgniteFs: " + ggfsName, iae); } return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java index 9cdae72,9cdae72..b2a622e --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerClearTask.java @@@ -54,7 -54,7 +54,7 @@@ public class VisorGgfsProfilerClearTas } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<Integer, Integer> run(String arg) throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<Integer, Integer> run(String arg) { int deleted = 0; int notDeleted = 0; @@@ -91,8 -91,8 +91,11 @@@ } } } -- catch (IOException | IllegalArgumentException ioe) { -- throw new IgniteCheckedException("Failed to clear profiler logs for GGFS: " + arg, ioe); ++ catch (IOException | IllegalArgumentException e) { ++ throw new IgniteException("Failed to clear profiler logs for GGFS: " + arg, e); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); } return new IgniteBiTuple<>(deleted, notDeleted); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java index 9e79c76,9e79c76..6ffc2c8 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsProfilerTask.java @@@ -160,7 -160,7 +160,7 @@@ public class VisorGgfsProfilerTask exte } /** {@inheritDoc} */ -- @Override protected Collection<VisorGgfsProfilerEntry> run(String arg) throws IgniteCheckedException { ++ @Override protected Collection<VisorGgfsProfilerEntry> run(String arg) { try { Path logsDir = resolveGgfsProfilerLogsDir(g.fileSystem(arg)); @@@ -170,7 -170,7 +170,10 @@@ return Collections.emptyList(); } catch (IOException | IllegalArgumentException e) { -- throw new IgniteCheckedException("Failed to parse profiler logs for GGFS: " + arg, e); ++ throw new IgniteException("Failed to parse profiler logs for GGFS: " + arg, e); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java index a92aa73,a92aa73..f2c787f --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsResetMetricsTask.java @@@ -53,13 -53,13 +53,13 @@@ public class VisorGgfsResetMetricsTask } /** {@inheritDoc} */ -- @Override protected Void run(Set<String> ggfsNames) throws IgniteCheckedException { ++ @Override protected Void run(Set<String> ggfsNames) { for (String ggfsName: ggfsNames) try { g.fileSystem(ggfsName).resetMetrics(); } catch (IllegalArgumentException iae) { -- throw new IgniteCheckedException("Failed to reset metrics for GGFS: " + ggfsName, iae); ++ throw new IgniteException("Failed to reset metrics for GGFS: " + ggfsName, iae); } return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java index 6d27a29,6d27a29..56d2ef6 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorGgfsSamplingStateTask.java @@@ -50,14 -50,14 +50,17 @@@ public class VisorGgfsSamplingStateTas } /** {@inheritDoc} */ -- @Override protected Void run(IgniteBiTuple<String, Boolean> arg) throws IgniteCheckedException { ++ @Override protected Void run(IgniteBiTuple<String, Boolean> arg) { try { -- ((GridGgfsEx) g.fileSystem(arg.get1())).globalSampling(arg.get2()); ++ ((GridGgfsEx)g.fileSystem(arg.get1())).globalSampling(arg.get2()); return null; } catch (IllegalArgumentException iae) { -- throw new IgniteCheckedException("Failed to set sampling state for GGFS: " + arg.get1(), iae); ++ throw new IgniteException("Failed to set sampling state for GGFS: " + arg.get1(), iae); ++ } ++ catch(IgniteCheckedException e) { ++ throw U.convertException(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java index 8491fdf,8491fdf..b02814d --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java @@@ -58,7 -58,7 +58,7 @@@ public class VisorLogSearchTask extend /** {@inheritDoc} */ @Nullable @Override protected IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>, -- Iterable<VisorLogSearchResult>> reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ Iterable<VisorLogSearchResult>> reduce0(List<ComputeJobResult> results) { Collection<VisorLogSearchResult> searchRes = new ArrayList<>(); Collection<IgniteBiTuple<Exception, UUID>> exRes = new ArrayList<>(); @@@ -76,6 -76,6 +76,7 @@@ return new IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>, Iterable<VisorLogSearchResult>> (exRes.isEmpty() ? null : exRes, searchRes.isEmpty() ? null : searchRes); } ++ /** * Arguments for {@link VisorLogSearchTask}. */ @@@ -208,11 -208,11 +209,11 @@@ } /** {@inheritDoc} */ -- @Override protected Collection<VisorLogSearchResult> run(VisorLogSearchArg arg) throws IgniteCheckedException { ++ @Override protected Collection<VisorLogSearchResult> run(VisorLogSearchArg arg) { URL url = U.resolveGridGainUrl(arg.folder); if (url == null) -- throw new GridInternalException(new FileNotFoundException("Log folder not found: " + arg.folder)); ++ throw U.convertException(new GridInternalException(new FileNotFoundException("Log folder not found: " + arg.folder))); UUID uuid = g.localNode().id(); String nid = uuid.toString().toLowerCase(); @@@ -258,7 -258,7 +259,7 @@@ return results.isEmpty() ? null : results; } catch (Exception e) { -- throw new IgniteCheckedException(e); ++ throw new IgniteException(e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java index e1edc5d,e1edc5d..05e1b00 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorAckTask.java @@@ -40,7 -40,7 +40,7 @@@ public class VisorAckTask extends Visor } /** {@inheritDoc} */ -- @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) { return null; } @@@ -62,7 -62,7 +62,7 @@@ } /** {@inheritDoc} */ -- @Override protected Void run(String arg) throws IgniteCheckedException { ++ @Override protected Void run(String arg) { System.out.println("<visor>: ack: " + (arg == null ? g.localNode().id() : arg)); return null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java index 3f6fae5,3f6fae5..1d6b4b1 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorLatestVersionTask.java @@@ -51,7 -51,7 +51,7 @@@ public class VisorLatestVersionTask ext } /** {@inheritDoc} */ -- @Override protected String run(Void arg) throws IgniteCheckedException { ++ @Override protected String run(Void arg) { return g.product().latestVersion(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java index 13de396,13de396..14c3595 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorNopTask.java @@@ -35,7 -35,7 +35,7 @@@ public class VisorNopTask implements Co /** {@inheritDoc} */ @Nullable @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, -- @Nullable Integer arg) throws IgniteCheckedException { ++ @Nullable Integer arg) { Map<ComputeJob, ClusterNode> map = new GridLeanMap<>(subgrid.size()); @@@ -47,12 -47,12 +47,12 @@@ /** {@inheritDoc} */ @Override public ComputeJobResultPolicy result(ComputeJobResult res, -- List<ComputeJobResult> rcvd) throws IgniteCheckedException { ++ List<ComputeJobResult> rcvd) { return ComputeJobResultPolicy.WAIT; } /** {@inheritDoc} */ -- @Nullable @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override public Void reduce(List<ComputeJobResult> results) { return null; } @@@ -69,7 -69,7 +69,7 @@@ /** {@inheritDoc} */ @SuppressWarnings("ConstantConditions") -- @Nullable @Override public Object execute() throws IgniteCheckedException { ++ @Nullable @Override public Object execute() { try { Integer maxTimeout = argument(0); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java index 6342bb5,6342bb5..93119ee --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/misc/VisorResolveHostNameTask.java @@@ -58,7 -58,7 +58,7 @@@ public class VisorResolveHostNameTask e } /** {@inheritDoc} */ -- @Override protected Map<String, String> run(Void arg) throws IgniteCheckedException { ++ @Override protected Map<String, String> run(Void arg) { Map<String, String> res = new HashMap<>(); try { @@@ -90,7 -90,7 +90,7 @@@ } } catch (Throwable e) { -- throw new IgniteCheckedException("Failed to resolve host name", e); ++ throw new IgniteException("Failed to resolve host name", e); } return res; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java index b927f9a,b927f9a..79e8f0b --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java @@@ -176,12 -176,12 +176,12 @@@ public class VisorNodeDataCollectorJob } /** {@inheritDoc} */ -- @Override protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorTaskArg arg) throws IgniteCheckedException { ++ @Override protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorTaskArg arg) { return run(new VisorNodeDataCollectorJobResult(), arg); } protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorJobResult res, -- VisorNodeDataCollectorTaskArg arg) throws IgniteCheckedException { ++ VisorNodeDataCollectorTaskArg arg) { res.gridName(g.name()); res.topologyVersion(g.topologyVersion()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java index bc0abe0,5efc1ac..5643223 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorTask.java @@@ -41,7 -40,7 +40,7 @@@ public class VisorNodeDataCollectorTas /** {@inheritDoc} */ @Override protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid, -- VisorTaskArgument<VisorNodeDataCollectorTaskArg> arg) throws IgniteCheckedException { ++ VisorTaskArgument<VisorNodeDataCollectorTaskArg> arg) { assert arg != null; Map<ComputeJob, ClusterNode> map = U.newHashMap(subgrid.size()); @@@ -63,19 -62,19 +62,19 @@@ } /** {@inheritDoc} */ -- @Nullable @Override protected VisorNodeDataCollectorTaskResult reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected VisorNodeDataCollectorTaskResult reduce0(List<ComputeJobResult> results) { return reduce(new VisorNodeDataCollectorTaskResult(), results); } protected VisorNodeDataCollectorTaskResult reduce(VisorNodeDataCollectorTaskResult taskResult, -- List<ComputeJobResult> results) throws IgniteCheckedException { ++ List<ComputeJobResult> results) { for (ComputeJobResult res : results) { VisorNodeDataCollectorJobResult jobResult = res.getData(); if (jobResult != null) { UUID nid = res.getNode().id(); -- IgniteCheckedException unhandledEx = res.getException(); ++ IgniteException unhandledEx = res.getException(); if (unhandledEx == null) reduceJobResult(taskResult, jobResult, nid); @@@ -91,7 -90,7 +90,7 @@@ } protected void reduceJobResult(VisorNodeDataCollectorTaskResult taskResult, -- VisorNodeDataCollectorJobResult jobResult, UUID nid) throws IgniteCheckedException { ++ VisorNodeDataCollectorJobResult jobResult, UUID nid) { taskResult.gridNames().put(nid, jobResult.gridName()); taskResult.topologyVersions().put(nid, jobResult.topologyVersion()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java index 6cf1f02,6cf1f02..cb33413 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java @@@ -51,8 -51,8 +51,7 @@@ public class VisorNodeEventsCollectorTa /** {@inheritDoc} */ @Override protected Iterable<? extends VisorGridEvent> reduce0( -- List<ComputeJobResult> results) throws IgniteCheckedException { -- ++ List<ComputeJobResult> results) { Collection<VisorGridEvent> allEvents = new ArrayList<>(); for (ComputeJobResult r : results) { @@@ -262,8 -262,8 +261,7 @@@ } /** {@inheritDoc} */ -- @Override protected Collection<? extends VisorGridEvent> run(final VisorNodeEventsCollectorTaskArg arg) -- throws IgniteCheckedException { ++ @Override protected Collection<? extends VisorGridEvent> run(final VisorNodeEventsCollectorTaskArg arg) { final long startEvtTime = arg.timeArgument() == null ? 0L : System.currentTimeMillis() - arg.timeArgument(); final ClusterNodeLocalMap<String, Long> nl = g.nodeLocalMap(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java index 9e66c10,9e66c10..885aa0f --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeGcTask.java @@@ -43,8 -43,8 +43,7 @@@ public class VisorNodeGcTask extends Vi } /** {@inheritDoc} */ -- @Nullable @Override protected Map<UUID, IgniteBiTuple<Long, Long>> reduce0(List<ComputeJobResult> results) -- throws IgniteCheckedException { ++ @Nullable @Override protected Map<UUID, IgniteBiTuple<Long, Long>> reduce0(List<ComputeJobResult> results) { Map<UUID, IgniteBiTuple<Long, Long>> total = new HashMap<>(); for (ComputeJobResult res: results) { @@@ -72,7 -72,7 +71,7 @@@ } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<Long, Long> run(Void arg) throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<Long, Long> run(Void arg) { ClusterNode locNode = g.localNode(); long before = freeHeap(locNode); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java index 20c8e5b,78a319b..6bf2386 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodePingTask.java @@@ -18,8 -18,8 +18,9 @@@ package org.apache.ignite.internal.visor.node; import org.apache.ignite.*; + import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; +import org.apache.ignite.internal.cluster.*; import org.apache.ignite.internal.processors.task.*; import org.apache.ignite.internal.visor.*; import org.apache.ignite.internal.util.lang.*; @@@ -42,7 -42,7 +43,7 @@@ public class VisorNodePingTask extends } /** {@inheritDoc} */ -- @Nullable @Override protected GridTuple3<Boolean, Long, Long> reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected GridTuple3<Boolean, Long, Long> reduce0(List<ComputeJobResult> results) { try { return super.reduce0(results); } @@@ -67,7 -67,7 +68,7 @@@ } /** {@inheritDoc} */ -- @Override protected GridTuple3<Boolean, Long, Long> run(UUID nodeToPing) throws IgniteCheckedException { ++ @Override protected GridTuple3<Boolean, Long, Long> run(UUID nodeToPing) { long start = System.currentTimeMillis(); return new GridTuple3<>(g.pingNode(nodeToPing), start, System.currentTimeMillis()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeRestartTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeRestartTask.java index bc5cddc,bc5cddc..f37fd00 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeRestartTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeRestartTask.java @@@ -35,7 -35,7 +35,7 @@@ public class VisorNodeRestartTask exten private static final long serialVersionUID = 0L; /** {@inheritDoc} */ -- @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) { return null; } @@@ -55,7 -55,7 +55,7 @@@ } /** {@inheritDoc} */ -- @Override protected Void run(Void arg) throws IgniteCheckedException { ++ @Override protected Void run(Void arg) { new Thread(new Runnable() { @Override public void run() { Ignition.restart(true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeStopTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeStopTask.java index 53608bb,53608bb..d75652b --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeStopTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeStopTask.java @@@ -40,7 -40,7 +40,7 @@@ public class VisorNodeStopTask extends } /** {@inheritDoc} */ -- @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) throws IgniteCheckedException { ++ @Nullable @Override protected Void reduce0(List<ComputeJobResult> results) { return null; } @@@ -60,7 -60,7 +60,7 @@@ } /** {@inheritDoc} */ -- @Override protected Void run(Void arg) throws IgniteCheckedException { ++ @Override protected Void run(Void arg) { new Thread(new Runnable() { @Override public void run() { Ignition.kill(true); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java index 3399fdf,3399fdf..21d42fc --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/portable/VisorPortableMetadataCollectorTask.java @@@ -55,7 -55,7 +55,7 @@@ public class VisorPortableMetadataColle } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<Long, Collection<VisorPortableMetadata>> run(Long lastUpdate) throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<Long, Collection<VisorPortableMetadata>> run(Long lastUpdate) { final IgnitePortables p = g.portables(); final Collection<VisorPortableMetadata> data = new ArrayList<>(p.metadata().size()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java index 8732768,8732768..0576276 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCleanupTask.java @@@ -44,7 -44,7 +44,7 @@@ public class VisorQueryCleanupTask exte /** {@inheritDoc} */ @Override protected Map<? extends ComputeJob, ClusterNode> map0(List<ClusterNode> subgrid, -- @Nullable VisorTaskArgument<Map<UUID, Collection<String>>> arg) throws IgniteCheckedException { ++ @Nullable VisorTaskArgument<Map<UUID, Collection<String>>> arg) { Set<UUID> nodeIds = taskArg.keySet(); Map<ComputeJob, ClusterNode> map = U.newHashMap(nodeIds.size()); @@@ -63,7 -63,7 +63,7 @@@ } /** {@inheritDoc} */ -- @Nullable @Override protected Void reduce0(List list) throws IgniteCheckedException { ++ @Nullable @Override protected Void reduce0(List list) { return null; } @@@ -85,7 -85,7 +85,7 @@@ } /** {@inheritDoc} */ -- @Override protected Void run(Collection<String> qryIds) throws IgniteCheckedException { ++ @Override protected Void run(Collection<String> qryIds) { ClusterNodeLocalMap<String, VisorQueryTask.VisorFutureResultSetHolder> locMap = g.nodeLocalMap(); for (String qryId : qryIds) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java index c4cd813,c4cd813..2002e83 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryNextPageTask.java @@@ -58,8 -58,8 +58,13 @@@ public class VisorQueryNextPageTask ext } /** {@inheritDoc} */ -- @Override protected VisorQueryResult run(IgniteBiTuple<String, Integer> arg) throws IgniteCheckedException { -- return arg.get1().startsWith(VisorQueryUtils.SCAN_QRY_NAME) ? nextScanPage(arg) : nextSqlPage(arg); ++ @Override protected VisorQueryResult run(IgniteBiTuple<String, Integer> arg) { ++ try { ++ return arg.get1().startsWith(VisorQueryUtils.SCAN_QRY_NAME) ? nextScanPage(arg) : nextSqlPage(arg); ++ } ++ catch (IgniteCheckedException e) { ++ throw U.convertException(e); ++ } } /** Collect data from SQL query */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java index 7b60a0e,7b60a0e..8961087 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryTask.java @@@ -188,8 -188,8 +188,7 @@@ public class VisorQueryTask extends Vis } /** {@inheritDoc} */ -- @Override protected IgniteBiTuple<? extends Exception, VisorQueryResultEx> run(VisorQueryArg arg) -- throws IgniteCheckedException { ++ @Override protected IgniteBiTuple<? extends Exception, VisorQueryResultEx> run(VisorQueryArg arg) { try { Boolean scan = arg.queryTxt().toUpperCase().startsWith("SCAN"); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java index d5c42a1,d5c42a1..383a883 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerMetricsResetTask.java @@@ -53,7 -53,7 +53,7 @@@ public class VisorStreamerMetricsResetT } /** {@inheritDoc} */ -- @Override protected Void run(String streamerName) throws IgniteCheckedException { ++ @Override protected Void run(String streamerName) { try { IgniteStreamer streamer = g.streamer(streamerName); @@@ -62,7 -62,7 +62,7 @@@ return null; } catch (IllegalArgumentException iae) { -- throw new IgniteCheckedException("Failed to reset metrics for streamer: " + escapeName(streamerName) + ++ throw new IgniteException("Failed to reset metrics for streamer: " + escapeName(streamerName) + " on node: " + g.localNode().id(), iae); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb2b9eaa/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java index 2ee1056,2ee1056..23b006b --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/streamer/VisorStreamerResetTask.java @@@ -53,7 -53,7 +53,7 @@@ public class VisorStreamerResetTask ext } /** {@inheritDoc} */ -- @Override protected Void run(String streamerName) throws IgniteCheckedException { ++ @Override protected Void run(String streamerName) { try { IgniteStreamer streamer = g.streamer(streamerName); @@@ -62,7 -62,7 +62,7 @@@ return null; } catch (IllegalArgumentException iae) { -- throw new IgniteCheckedException("Failed to reset streamer: " + escapeName(streamerName) ++ throw new IgniteException("Failed to reset streamer: " + escapeName(streamerName) + " on node: " + g.localNode().id(), iae); } }