http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java index d8f81b6..46ecf48 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProcessor.java @@ -9,6 +9,7 @@ package org.gridgain.grid.kernal.processors.service; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.configuration.*; import org.apache.ignite.events.*; @@ -37,9 +38,9 @@ import java.util.concurrent.*; import static java.util.Map.*; import static org.apache.ignite.configuration.IgniteDeploymentMode.*; +import static org.apache.ignite.events.IgniteEventType.*; import static org.gridgain.grid.cache.GridCacheTxConcurrency.*; import static org.gridgain.grid.cache.GridCacheTxIsolation.*; -import static org.apache.ignite.events.IgniteEventType.*; import static org.gridgain.grid.kernal.processors.cache.GridCacheUtils.*; /** @@ -91,7 +92,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void start() throws GridException { + @Override public void start() throws IgniteCheckedException { if (ctx.isDaemon()) return; @@ -101,12 +102,12 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (cfg.isPeerClassLoadingEnabled() && (depMode == PRIVATE || depMode == ISOLATED) && !F.isEmpty(cfg.getServiceConfiguration())) - throw new GridException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode); + throw new IgniteCheckedException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode); } /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public void onKernalStart() throws GridException { + @Override public void onKernalStart() throws IgniteCheckedException { if (ctx.isDaemon()) return; @@ -165,7 +166,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (cfgQry != null) cfgQry.close(); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to unsubscribe service configuration notifications.", e); } @@ -173,7 +174,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (assignQry != null) assignQry.close(); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to unsubscribe service assignment notifications.", e); } @@ -217,15 +218,15 @@ public class GridServiceProcessor extends GridProcessorAdapter { * Validates service configuration. * * @param c Service configuration. - * @throws GridRuntimeException If validation failed. + * @throws IgniteException If validation failed. */ - private void validate(ManagedServiceConfiguration c) throws GridRuntimeException { + private void validate(ManagedServiceConfiguration c) throws IgniteException { IgniteConfiguration cfg = ctx.config(); IgniteDeploymentMode depMode = cfg.getDeploymentMode(); if (cfg.isPeerClassLoadingEnabled() && (depMode == PRIVATE || depMode == ISOLATED)) - throw new GridRuntimeException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode); + throw new IgniteException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode); ensure(c.getName() != null, "getName() != null", null); ensure(c.getTotalCount() >= 0, "getTotalCount() >= 0", c.getTotalCount()); @@ -243,9 +244,9 @@ public class GridServiceProcessor extends GridProcessorAdapter { private void ensure(boolean cond, String desc, @Nullable Object v) { if (!cond) if (v != null) - throw new GridRuntimeException("Service configuration check failed (" + desc + "): " + v); + throw new IgniteException("Service configuration check failed (" + desc + "): " + v); else - throw new GridRuntimeException("Service configuration check failed (" + desc + ")"); + throw new IgniteException("Service configuration check failed (" + desc + ")"); } /** @@ -323,7 +324,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (old != null) { if (!old.configuration().equalsIgnoreNodeFilter(cfg)) { - fut.onDone(new GridException("Failed to deploy service (service already exists with " + + fut.onDone(new IgniteCheckedException("Failed to deploy service (service already exists with " + "different configuration) [deployed=" + old.configuration() + ", new=" + cfg + ']')); return fut; @@ -348,7 +349,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { // Remove future from local map. depFuts.remove(cfg.getName(), fut); - fut.onDone(new GridException("Failed to deploy service (service already exists with " + + fut.onDone(new IgniteCheckedException("Failed to deploy service (service already exists with " + "different configuration) [deployed=" + dep.configuration() + ", new=" + cfg + ']')); } else { @@ -384,7 +385,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (log.isDebugEnabled()) log.debug("Topology changed while deploying service (will retry): " + e.getMessage()); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (e.hasCause(ClusterTopologyException.class)) { if (log.isDebugEnabled()) log.debug("Topology changed while deploying service (will retry): " + e.getMessage()); @@ -429,7 +430,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (log.isDebugEnabled()) log.debug("Topology changed while deploying service (will retry): " + e.getMessage()); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to undeploy service: " + name, e); return new GridFinishedFuture<>(ctx, e); @@ -481,7 +482,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { descs.add(desc); } } - catch (GridException ex) { + catch (IgniteCheckedException ex) { log.error("Failed to get assignments from replicated cache for service: " + dep.configuration().getName(), ex); } @@ -546,14 +547,14 @@ public class GridServiceProcessor extends GridProcessorAdapter { */ @SuppressWarnings("unchecked") public <T> T serviceProxy(ClusterGroup prj, String name, Class<? super T> svcItf, boolean sticky) - throws GridRuntimeException { + throws IgniteException { if (hasLocalNode(prj)) { ManagedServiceContextImpl ctx = serviceContext(name); if (ctx != null) { if (!svcItf.isAssignableFrom(ctx.service().getClass())) - throw new GridRuntimeException("Service does not implement specified interface [svcItf=" + + throw new IgniteException("Service does not implement specified interface [svcItf=" + svcItf.getSimpleName() + ", svcCls=" + ctx.service().getClass() + ']'); return (T)ctx.service(); @@ -607,9 +608,9 @@ public class GridServiceProcessor extends GridProcessorAdapter { * * @param dep Service deployment. * @param topVer Topology version. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private void reassign(GridServiceDeployment dep, long topVer) throws GridException { + private void reassign(GridServiceDeployment dep, long topVer) throws IgniteCheckedException { ManagedServiceConfiguration cfg = dep.configuration(); int totalCnt = cfg.getTotalCount(); @@ -811,7 +812,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { log.debug("Service thread was interrupted [name=" + svcCtx.name() + ", execId=" + svcCtx.executionId() + ']'); } - catch (GridRuntimeException e) { + catch (IgniteException e) { if (e.hasCause(InterruptedException.class) || e.hasCause(GridInterruptedException.class)) { if (log.isDebugEnabled()) @@ -834,7 +835,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { try { ctx.resource().cleanup(cp); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to clean up service (will ignore): " + svcCtx.name(), e); } } @@ -861,7 +862,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { return cp; } - catch (GridException e) { + catch (IgniteCheckedException e) { log.error("Failed to copy service (will reuse same instance): " + svc.getClass(), e); return svc; @@ -971,7 +972,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { try { cache.remove(key); } - catch (GridException ex) { + catch (IgniteCheckedException ex) { log.error("Failed to remove assignments for undeployed service: " + name, ex); } } @@ -998,7 +999,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { if (newTopVer == topVer) reassign(dep, topVer); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!(e instanceof ClusterTopologyException)) log.error("Failed to do service reassignment (will retry): " + dep.configuration().getName(), e); @@ -1078,7 +1079,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { reassign(dep, topVer); } - catch (GridException ex) { + catch (IgniteCheckedException ex) { if (!(e instanceof ClusterTopologyException)) LT.error(log, ex, "Failed to do service reassignment (will retry): " + dep.configuration().getName()); @@ -1111,7 +1112,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { cache.remove(e.getKey()); } } - catch (GridException ex) { + catch (IgniteCheckedException ex) { log.error("Failed to clean up zombie assignments for service: " + name, ex); } } @@ -1148,7 +1149,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { it.remove(); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!(e instanceof ClusterTopologyException)) LT.error(log, e, "Failed to do service reassignment (will retry): " + dep.configuration().getName());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProxy.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProxy.java index 3c668dc..fd6ee88 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProxy.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/service/GridServiceProxy.java @@ -125,7 +125,7 @@ class GridServiceProxy<T> implements Serializable { node = nodeForService(name, sticky); if (node == null) - throw new GridRuntimeException("Failed to find deployed service: " + name); + throw new IgniteException("Failed to find deployed service: " + name); // If service is deployed locally, then execute locally. if (node.isLocal()) { @@ -152,7 +152,7 @@ class GridServiceProxy<T> implements Serializable { throw e; } catch (Exception e) { - throw new GridRuntimeException(e); + throw new IgniteException(e); } // If we are here, that means that service was not found @@ -167,7 +167,7 @@ class GridServiceProxy<T> implements Serializable { catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new GridRuntimeException(e); + throw new IgniteException(e); } } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/session/GridTaskSessionProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/session/GridTaskSessionProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/session/GridTaskSessionProcessor.java index 21a1b8a..50dd757 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/session/GridTaskSessionProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/session/GridTaskSessionProcessor.java @@ -9,9 +9,9 @@ package org.gridgain.grid.kernal.processors.session; +import org.apache.ignite.*; import org.apache.ignite.compute.*; import org.apache.ignite.lang.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.kernal.managers.deployment.*; import org.gridgain.grid.kernal.processors.*; @@ -39,7 +39,7 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter { /** * Starts session processor. */ - @Override public void start() throws GridException { + @Override public void start() throws IgniteCheckedException { if (log.isDebugEnabled()) log.debug("Session processor started."); } @@ -47,7 +47,7 @@ public class GridTaskSessionProcessor extends GridProcessorAdapter { /** * Stops session processor. */ - @Override public void stop(boolean cancel) throws GridException { + @Override public void stop(boolean cancel) throws IgniteCheckedException { if (log.isDebugEnabled()) log.debug("Session processor stopped."); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/spring/GridSpringProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/spring/GridSpringProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/spring/GridSpringProcessor.java index 6717984..8742eb2 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/spring/GridSpringProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/spring/GridSpringProcessor.java @@ -33,12 +33,12 @@ public interface GridSpringProcessor { * @param cfgUrl Configuration file path or URL. This cannot be {@code null}. * @param excludedProps Properties to exclude. * @return Tuple containing all loaded configurations and Spring context used to load them. - * @throws GridException If grid could not be started or configuration + * @throws IgniteCheckedException If grid could not be started or configuration * read. This exception will be thrown also if grid with given name has already * been started or Spring XML configuration file is invalid. */ public IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> loadConfigurations( - URL cfgUrl, String... excludedProps) throws GridException; + URL cfgUrl, String... excludedProps) throws IgniteCheckedException; /** * Loads bean instances that match the given types from given configuration file. @@ -47,9 +47,9 @@ public interface GridSpringProcessor { * @param beanClasses Beans classes. * @return Bean class -> loaded bean instance map, if configuration does not contain bean with required type the * map value is {@code null}. - * @throws GridException If failed to load configuration. + * @throws IgniteCheckedException If failed to load configuration. */ - public Map<Class<?>, Object> loadBeans(URL cfgUrl, Class<?>... beanClasses) throws GridException; + public Map<Class<?>, Object> loadBeans(URL cfgUrl, Class<?>... beanClasses) throws IgniteCheckedException; /** * Gets user version for given class loader by checking http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java index 5523140..f60ae9b 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamProcessor.java @@ -52,7 +52,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void onKernalStart() throws GridException { + @Override public void onKernalStart() throws IgniteCheckedException { if (ctx.config().isDaemon()) return; @@ -140,9 +140,9 @@ public class GridStreamProcessor extends GridProcessorAdapter { * Check configuration identity on local and remote nodes. * * @param rmtNode Remote node to check. - * @throws GridException If configuration mismatch detected. + * @throws IgniteCheckedException If configuration mismatch detected. */ - private void checkStreamer(ClusterNode rmtNode) throws GridException { + private void checkStreamer(ClusterNode rmtNode) throws IgniteCheckedException { GridStreamerAttributes[] rmtAttrs = rmtNode.attribute(ATTR_STREAMER); GridStreamerAttributes[] locAttrs = ctx.discovery().localNode().attribute(ATTR_STREAMER); @@ -156,7 +156,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { continue; if (rmtAttr.atLeastOnce() != locAttr.atLeastOnce()) - throw new GridException("Streamer atLeastOnce configuration flag mismatch (fix atLeastOnce flag " + + throw new IgniteCheckedException("Streamer atLeastOnce configuration flag mismatch (fix atLeastOnce flag " + "in streamer configuration or set " + "-D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property) [streamer=" + locAttr.name() + @@ -165,7 +165,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { ", rmtNodeId=" + rmtNode.id() + ']'); if (!rmtAttr.stages().equals(locAttr.stages())) - throw new GridException("Streamer stages configuration mismatch (fix streamer stages " + + throw new IgniteCheckedException("Streamer stages configuration mismatch (fix streamer stages " + "configuration or set " + "-D" + GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system " + "property) [streamer=" + locAttr.name() + @@ -215,7 +215,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void start() throws GridException { + @Override public void start() throws IgniteCheckedException { if (ctx.config().isDaemon()) return; @@ -249,7 +249,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { if (old != null) { old.stop(true); - throw new GridException("Duplicate streamer name found (check configuration and " + + throw new IgniteCheckedException("Duplicate streamer name found (check configuration and " + "assign unique name to each streamer): " + c.getName()); } } @@ -278,7 +278,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void stop(boolean cancel) throws GridException { + @Override public void stop(boolean cancel) throws IgniteCheckedException { if (ctx.config().isDaemon()) return; @@ -289,7 +289,7 @@ public class GridStreamProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void addAttributes(Map<String, Object> attrs) throws GridException { + @Override public void addAttributes(Map<String, Object> attrs) throws IgniteCheckedException { super.addAttributes(attrs); StreamerConfiguration[] cfg = ctx.config().getStreamerConfiguration(); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java index b3edf48..6e236ea 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextDelegate.java @@ -9,10 +9,10 @@ package org.gridgain.grid.kernal.processors.streamer; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; import org.apache.ignite.streamer.*; -import org.gridgain.grid.*; import org.jetbrains.annotations.*; import java.util.*; @@ -63,36 +63,36 @@ public class GridStreamerContextDelegate implements StreamerContext { } /** {@inheritDoc} */ - @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws GridException { + @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws IgniteCheckedException { return delegate.query(clo); } /** {@inheritDoc} */ @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo, Collection<ClusterNode> nodes) - throws GridException { + throws IgniteCheckedException { return delegate.query(clo, nodes); } /** {@inheritDoc} */ - @Override public void broadcast(IgniteInClosure<StreamerContext> clo) throws GridException { + @Override public void broadcast(IgniteInClosure<StreamerContext> clo) throws IgniteCheckedException { delegate.broadcast(clo); } /** {@inheritDoc} */ @Override public void broadcast(IgniteInClosure<StreamerContext> clo, Collection<ClusterNode> nodes) - throws GridException { + throws IgniteCheckedException { delegate.broadcast(clo, nodes); } /** {@inheritDoc} */ @Override public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc) - throws GridException { + throws IgniteCheckedException { return delegate.reduce(clo, rdc); } /** {@inheritDoc} */ @Override public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc, - Collection<ClusterNode> nodes) throws GridException { + Collection<ClusterNode> nodes) throws IgniteCheckedException { return delegate.reduce(clo, rdc, nodes); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java index 30061ec..e116720 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerContextImpl.java @@ -9,10 +9,10 @@ package org.gridgain.grid.kernal.processors.streamer; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; import org.apache.ignite.streamer.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.kernal.processors.streamer.task.*; import org.gridgain.grid.util.typedef.*; @@ -103,13 +103,13 @@ public class GridStreamerContextImpl implements StreamerContext { } /** {@inheritDoc} */ - @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws GridException { + @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo) throws IgniteCheckedException { return query(clo, Collections.<ClusterNode>emptyList()); } /** {@inheritDoc} */ @Override public <R> Collection<R> query(IgniteClosure<StreamerContext, R> clo, Collection<ClusterNode> nodes) - throws GridException { + throws IgniteCheckedException { ctx.gateway().readLock(); try { @@ -132,13 +132,13 @@ public class GridStreamerContextImpl implements StreamerContext { } /** {@inheritDoc} */ - @Override public void broadcast(IgniteInClosure<StreamerContext> clo) throws GridException { + @Override public void broadcast(IgniteInClosure<StreamerContext> clo) throws IgniteCheckedException { broadcast(clo, Collections.<ClusterNode>emptyList()); } /** {@inheritDoc} */ @Override public void broadcast(IgniteInClosure<StreamerContext> clo, Collection<ClusterNode> nodes) - throws GridException { + throws IgniteCheckedException { ctx.gateway().readLock(); try { @@ -156,13 +156,13 @@ public class GridStreamerContextImpl implements StreamerContext { /** {@inheritDoc} */ @Override public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc) - throws GridException { + throws IgniteCheckedException { return reduce(clo, rdc, Collections.<ClusterNode>emptyList()); } /** {@inheritDoc} */ @Override public <R1, R2> R2 reduce(IgniteClosure<StreamerContext, R1> clo, IgniteReducer<R1, R2> rdc, - Collection<ClusterNode> nodes) throws GridException { + Collection<ClusterNode> nodes) throws IgniteCheckedException { ctx.gateway().readLock(); try { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerRouteFailedException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerRouteFailedException.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerRouteFailedException.java index 21843bb..c545cb0 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerRouteFailedException.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerRouteFailedException.java @@ -9,13 +9,13 @@ package org.gridgain.grid.kernal.processors.streamer; -import org.gridgain.grid.*; +import org.apache.ignite.*; /** * Exception thrown when router did not return route map. In this case pipeline execution is stopped * and corresponding callback is executed on originating node. */ -public class GridStreamerRouteFailedException extends GridException { +public class GridStreamerRouteFailedException extends IgniteCheckedException { /** */ private static final long serialVersionUID = 0L; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java index 482a02e..7b559e3 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerStageExecutionFuture.java @@ -217,7 +217,7 @@ public class GridStreamerStageExecutionFuture extends GridFutureAdapter<Object> streamer.scheduleExecutions(this, childExecs); } } - catch (GridException e) { + catch (IgniteCheckedException e) { onFailed(ctx.localNodeId(), e); } } @@ -336,7 +336,7 @@ public class GridStreamerStageExecutionFuture extends GridFutureAdapter<Object> } /** {@inheritDoc} */ - @Override public boolean cancel() throws GridException { + @Override public boolean cancel() throws IgniteCheckedException { if (!onCancelled()) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java index 983449d..1e91705 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerEx.java @@ -65,10 +65,10 @@ public interface IgniteStreamerEx extends IgniteStreamer { * * @param fut Future. * @param execs Executions grouped by node ID. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ public void scheduleExecutions(GridStreamerStageExecutionFuture fut, Map<UUID, GridStreamerExecutionBatch> execs) - throws GridException; + throws IgniteCheckedException; /** * Callback for undeployed class loaders. All deployed events will be removed from window and local storage. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java index 0861c10..c18a154 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/IgniteStreamerImpl.java @@ -168,19 +168,19 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { } /** - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ @SuppressWarnings("unchecked") - public void start() throws GridException { + public void start() throws IgniteCheckedException { if (log.isDebugEnabled()) log.debug("Starting streamer: " + name); if (F.isEmpty(c.getStages())) - throw new GridException("Streamer should have at least one stage configured " + + throw new IgniteCheckedException("Streamer should have at least one stage configured " + "(fix configuration and restart): " + name); if (F.isEmpty(c.getWindows())) - throw new GridException("Streamer should have at least one window configured " + + throw new IgniteCheckedException("Streamer should have at least one window configured " + "(fix configuration and restart): " + name); prepareResources(); @@ -197,11 +197,11 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { String sName = s.name(); if (F.isEmpty(sName)) - throw new GridException("Streamer stage should have non-empty name [streamerName=" + name + + throw new IgniteCheckedException("Streamer stage should have non-empty name [streamerName=" + name + ", stage=" + s + ']'); if (stages.containsKey(sName)) - throw new GridException("Streamer stages have duplicate names (all names should be unique) " + + throw new IgniteCheckedException("Streamer stages have duplicate names (all names should be unique) " + "[streamerName=" + name + ", stage=" + s + ", stageName=" + sName + ']'); if (firstStage == null) @@ -225,11 +225,11 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { String wName = w.name(); if (F.isEmpty(wName)) - throw new GridException("Streamer window should have non-empty name [streamerName=" + name + + throw new IgniteCheckedException("Streamer window should have non-empty name [streamerName=" + name + ", window=" + w + ']'); if (winMap.containsKey(wName)) - throw new GridException("Streamer windows have duplicate names (all names should be unique). " + + throw new IgniteCheckedException("Streamer windows have duplicate names (all names should be unique). " + "If you use two or more windows of the same type you need to assign their names explicitly " + "[streamer=" + name + ", windowName=" + wName + ']'); @@ -289,9 +289,9 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { /** * Injects resources into streamer components. * - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private void prepareResources() throws GridException { + private void prepareResources() throws IgniteCheckedException { for (StreamerStage s : c.getStages()) ctx.resource().injectGeneric(s); @@ -325,7 +325,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { execFut.cancel(); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.warn(log, "Failed to cancel batch execution future on node stop (will ignore) " + "[execFut=" + execFut + ", err=" + e + ']'); } @@ -342,7 +342,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { fut.get(); } } - catch (GridException ignore) { + catch (IgniteCheckedException ignore) { // For failed futures callback will be executed, no need to care about this exception here. } } @@ -351,7 +351,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { execFut.get(); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!e.hasCause(GridInterruptedException.class)) U.warn(log, "Failed to wait for batch execution future completion (will ignore) " + "[execFut=" + execFut + ", e=" + e + ']'); @@ -363,7 +363,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { ctx.resource().cleanupGeneric(stage.unwrap()); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to cleanup stage [stage=" + stage + ", streamer=" + this + ']', e); } } @@ -411,7 +411,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { } /** {@inheritDoc} */ - @Override public void addEvent(Object evt, Object... evts) throws GridException { + @Override public void addEvent(Object evt, Object... evts) throws IgniteCheckedException { A.notNull(evt, "evt"); if (!F.isEmpty(evts)) @@ -421,7 +421,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { } /** {@inheritDoc} */ - @Override public void addEventToStage(String stageName, Object evt, Object... evts) throws GridException { + @Override public void addEventToStage(String stageName, Object evt, Object... evts) throws IgniteCheckedException { A.notNull(stageName, "stageName"); A.notNull(evt, "evt"); @@ -432,14 +432,14 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { } /** {@inheritDoc} */ - @Override public void addEvents(Collection<?> evts) throws GridException { + @Override public void addEvents(Collection<?> evts) throws IgniteCheckedException { A.ensure(!F.isEmpty(evts), "evts cannot be null or empty"); addEventsToStage(firstStage, evts); } /** {@inheritDoc} */ - @Override public void addEventsToStage(String stageName, Collection<?> evts) throws GridException { + @Override public void addEventsToStage(String stageName, Collection<?> evts) throws IgniteCheckedException { A.notNull(stageName, "stageName"); A.ensure(!F.isEmpty(evts), "evts cannot be empty or null"); @@ -660,7 +660,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { /** {@inheritDoc} */ @Override public void scheduleExecutions(GridStreamerStageExecutionFuture fut, - Map<UUID, GridStreamerExecutionBatch> execs) throws GridException { + Map<UUID, GridStreamerExecutionBatch> execs) throws IgniteCheckedException { for (Map.Entry<UUID, GridStreamerExecutionBatch> entry : execs.entrySet()) { UUID nodeId = entry.getKey(); GridStreamerExecutionBatch batch = entry.getValue(); @@ -698,16 +698,16 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { * Schedules batch execution locally. * * @param batch Batch to execute. - * @throws GridException If schedule was attempted on stopping grid. + * @throws IgniteCheckedException If schedule was attempted on stopping grid. */ - private void scheduleLocal(final GridStreamerExecutionBatch batch) throws GridException { + private void scheduleLocal(final GridStreamerExecutionBatch batch) throws IgniteCheckedException { final IgniteUuid futId = batch.futureId(); lock.readLock(); try { if (stopping) - throw new GridException("Failed to schedule local batch execution (grid is stopping): " + batch); + throw new IgniteCheckedException("Failed to schedule local batch execution (grid is stopping): " + batch); if (log.isDebugEnabled()) log.debug("Scheduling local batch execution [futId=" + futId + ", stageName=" + batch.stageName() + ']'); @@ -716,7 +716,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { if (wrapper == null) { completeParentStage(ctx.localNodeId(), batch.futureId(), - new GridException("Failed to process streamer batch (stage was not found): " + + new IgniteCheckedException("Failed to process streamer batch (stage was not found): " + batch.stageName() + ']')); return; @@ -804,7 +804,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { sendWithRetries(dstNodeId, new GridStreamerResponse(futId, errBytes)); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!e.hasCause(ClusterTopologyException.class)) log.error("Failed to complete parent stage [futId=" + futId + ", err=" + e + ']'); } @@ -846,7 +846,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { batchFut.cancel(); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.warning("Failed to cancel batch execution future [cancelledFutId=" + cancelledFutId + ", batchFut=" + batchFut + ']', e); } @@ -859,7 +859,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { sendWithRetries(nodeId, new GridStreamerCancelRequest(cancelledFutId)); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!e.hasCause(ClusterTopologyException.class)) log.error("Failed to send streamer cancel request to remote node [nodeId=" + nodeId + ", cancelledFutId=" + cancelledFutId + ']', e); @@ -933,7 +933,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { batch = executionBatch(sndNodeId, req); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to unmarshal execution batch (was class undeployed?) " + "[sndNodeId=" + sndNodeId + ", msg=" + msg + ']', e); @@ -943,7 +943,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { scheduleLocal(batch); } - catch (GridException e) { + catch (IgniteCheckedException e) { // Notify parent in case of error. completeParentStage(ctx.localNodeId(), batch.futureId(), e); } @@ -964,7 +964,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { try { err = ctx.config().getMarshaller().unmarshal(res.errorBytes(), null); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to unmarshal response.", e); } } @@ -1026,10 +1026,10 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { * * @param batch Execution batch. * @return Execution request. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ private GridTcpCommunicationMessageAdapter createExecutionRequest(GridStreamerExecutionBatch batch) - throws GridException { + throws IgniteCheckedException { boolean depEnabled = ctx.deploy().enabled(); byte[] batchBytes = ctx.config().getMarshaller().marshal(batch); @@ -1042,7 +1042,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { GridDeployment dep = ctx.deploy().deploy(pda.deployClass(), pda.classLoader()); if (dep == null) - throw new GridException("Failed to get deployment for batch request [batch=" + batch + + throw new IgniteCheckedException("Failed to get deployment for batch request [batch=" + batch + ", pda=" + pda + ']'); return new GridStreamerExecutionRequest( @@ -1064,10 +1064,10 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { * @param nodeId Node ID. * @param req Execution request. * @return Execution batch. - * @throws GridException If unmarshalling failed. + * @throws IgniteCheckedException If unmarshalling failed. */ private GridStreamerExecutionBatch executionBatch(UUID nodeId, GridStreamerExecutionRequest req) - throws GridException { + throws IgniteCheckedException { GridDeployment dep = null; if (!req.forceLocalDeployment()) { @@ -1082,7 +1082,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { null); if (dep == null) - throw new GridException("Failed to obtain global deployment based on deployment metadata " + + throw new IgniteCheckedException("Failed to obtain global deployment based on deployment metadata " + "[nodeId=" + nodeId + ", req=" + req + ']'); } @@ -1100,16 +1100,16 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { * * @param dstNodeId Destination node ID. * @param msg Message to send. - * @throws GridException If failed. + * @throws IgniteCheckedException If failed. */ - private void sendWithRetries(UUID dstNodeId, GridTcpCommunicationMessageAdapter msg) throws GridException { + private void sendWithRetries(UUID dstNodeId, GridTcpCommunicationMessageAdapter msg) throws IgniteCheckedException { for (int i = 0; i < SEND_RETRY_COUNT; i++) { try { ctx.io().send(dstNodeId, topic, msg, GridIoPolicy.SYSTEM_POOL); return; } - catch (GridException e) { + catch (IgniteCheckedException e) { if (log.isDebugEnabled()) log.debug("Failed to send message to remote node (will retry) [dstNodeId=" + dstNodeId + ", msg=" + msg + ", err=" + e + ']'); @@ -1306,7 +1306,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { if (res != null) { for (Map.Entry<String, Collection<?>> entry : res.entrySet()) { if (entry.getKey() == null) - throw new GridException("Failed to pass events to next stage " + + throw new IgniteCheckedException("Failed to pass events to next stage " + "(stage name cannot be null)."); GridStreamerStageExecutionFuture part = addEvents0( @@ -1333,7 +1333,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { batch.executionNodeIds().size()); } } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!atLeastOnce) { notifyFailure(batch.stageName(), batch.events(), e); @@ -1380,7 +1380,7 @@ public class IgniteStreamerImpl implements IgniteStreamerEx, Externalizable { } /** {@inheritDoc} */ - @Override public boolean cancel() throws GridException { + @Override public boolean cancel() throws IgniteCheckedException { assert w != null; if (!super.cancel()) http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageWrapper.java index d4b6486..fa72709 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/StreamerStageWrapper.java @@ -9,8 +9,8 @@ package org.gridgain.grid.kernal.processors.streamer; +import org.apache.ignite.*; import org.apache.ignite.streamer.*; -import org.gridgain.grid.*; import org.gridgain.grid.util.typedef.internal.*; import org.jetbrains.annotations.*; @@ -66,7 +66,7 @@ public class StreamerStageWrapper implements StreamerStage<Object> { /** {@inheritDoc} */ @Override public Map<String, Collection<?>> run(StreamerContext ctx, Collection<Object> evts) - throws GridException { + throws IgniteCheckedException { return delegate.run(ctx, evts); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerBroadcastTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerBroadcastTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerBroadcastTask.java index ccab0e6..fb29ccd 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerBroadcastTask.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerBroadcastTask.java @@ -49,7 +49,7 @@ public class GridStreamerBroadcastTask extends GridPeerDeployAwareTaskAdapter<Vo /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Void arg) - throws GridException { + throws IgniteCheckedException { Map<ComputeJob, ClusterNode> res = U.newHashMap(subgrid.size()); for (ClusterNode node : subgrid) @@ -59,12 +59,12 @@ public class GridStreamerBroadcastTask extends GridPeerDeployAwareTaskAdapter<Vo } /** {@inheritDoc} */ - @Override public Void reduce(List<ComputeJobResult> results) throws GridException { + @Override public Void reduce(List<ComputeJobResult> results) throws IgniteCheckedException { return null; } /** {@inheritDoc} */ - @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException { + @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException { // No failover. if (res.getException() != null) throw res.getException(); @@ -106,7 +106,7 @@ public class GridStreamerBroadcastTask extends GridPeerDeployAwareTaskAdapter<Vo } /** {@inheritDoc} */ - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { IgniteStreamer s = g.streamer(streamer); assert s != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerQueryTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerQueryTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerQueryTask.java index d10557b..bdb59d9 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerQueryTask.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerQueryTask.java @@ -49,7 +49,7 @@ public class GridStreamerQueryTask<R> extends GridPeerDeployAwareTaskAdapter<Voi /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Void arg) - throws GridException { + throws IgniteCheckedException { Map<ComputeJob, ClusterNode> res = U.newHashMap(subgrid.size()); for (ClusterNode node : subgrid) @@ -59,7 +59,7 @@ public class GridStreamerQueryTask<R> extends GridPeerDeployAwareTaskAdapter<Voi } /** {@inheritDoc} */ - @Override public Collection<R> reduce(List<ComputeJobResult> results) throws GridException { + @Override public Collection<R> reduce(List<ComputeJobResult> results) throws IgniteCheckedException { Collection<R> res = new ArrayList<>(results.size()); for (ComputeJobResult jobRes : results) @@ -69,7 +69,7 @@ public class GridStreamerQueryTask<R> extends GridPeerDeployAwareTaskAdapter<Voi } /** {@inheritDoc} */ - @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException { + @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException { // No failover for this task. if (res.getException() != null) throw res.getException(); @@ -111,7 +111,7 @@ public class GridStreamerQueryTask<R> extends GridPeerDeployAwareTaskAdapter<Voi } /** {@inheritDoc} */ - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { IgniteStreamer s = g.streamer(streamer); assert s != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerReduceTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerReduceTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerReduceTask.java index 0a236e5..6732e02 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerReduceTask.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/task/GridStreamerReduceTask.java @@ -56,7 +56,7 @@ public class GridStreamerReduceTask<R1, R2> extends GridPeerDeployAwareTaskAdapt /** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Void arg) - throws GridException { + throws IgniteCheckedException { Map<ComputeJob, ClusterNode> res = U.newHashMap(subgrid.size()); for (ClusterNode node : subgrid) @@ -66,12 +66,12 @@ public class GridStreamerReduceTask<R1, R2> extends GridPeerDeployAwareTaskAdapt } /** {@inheritDoc} */ - @Override public R2 reduce(List<ComputeJobResult> results) throws GridException { + @Override public R2 reduce(List<ComputeJobResult> results) throws IgniteCheckedException { return rdc.reduce(); } /** {@inheritDoc} */ - @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws GridException { + @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) throws IgniteCheckedException { // No failover for this task. if (res.getException() != null) throw res.getException(); @@ -115,7 +115,7 @@ public class GridStreamerReduceTask<R1, R2> extends GridPeerDeployAwareTaskAdapt } /** {@inheritDoc} */ - @Override public Object execute() throws GridException { + @Override public Object execute() throws IgniteCheckedException { IgniteStreamer s = g.streamer(streamer); assert s != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java index 0874db1..d05d5ba 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskProcessor.java @@ -9,11 +9,13 @@ package org.gridgain.grid.kernal.processors.task; +import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.events.*; import org.apache.ignite.lang.*; import org.apache.ignite.marshaller.*; +import org.apache.ignite.plugin.security.*; import org.gridgain.grid.*; import org.gridgain.grid.cache.*; import org.gridgain.grid.kernal.*; @@ -21,7 +23,6 @@ import org.gridgain.grid.kernal.managers.communication.*; import org.gridgain.grid.kernal.managers.deployment.*; import org.gridgain.grid.kernal.managers.eventstorage.*; import org.gridgain.grid.kernal.processors.*; -import org.apache.ignite.plugin.security.*; import org.gridgain.grid.util.*; import org.gridgain.grid.util.lang.*; import org.gridgain.grid.util.typedef.*; @@ -131,7 +132,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { catch (ComputeTaskCancelledException e) { U.warn(log, e.getMessage()); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Task failed: " + task, e); } } @@ -406,7 +407,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { if (endTime < 0) endTime = Long.MAX_VALUE; - GridException deployEx = null; + IgniteCheckedException deployEx = null; GridDeployment dep = null; // User provided task name. @@ -428,10 +429,10 @@ public class GridTaskProcessor extends GridProcessorAdapter { "task (was task (re|un)deployed?) [taskName=" + taskName + ", dep=" + dep + ']'); if (!ComputeTask.class.isAssignableFrom(taskCls)) - throw new GridException("Failed to auto-deploy task (deployed class is not a task) [taskName=" + + throw new IgniteCheckedException("Failed to auto-deploy task (deployed class is not a task) [taskName=" + taskName + ", depCls=" + taskCls + ']'); } - catch (GridException e) { + catch (IgniteCheckedException e) { deployEx = e; } } @@ -449,7 +450,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { taskName = taskName(dep, taskCls, map); } - catch (GridException e) { + catch (IgniteCheckedException e) { taskName = taskCls.getName(); deployEx = e; @@ -488,7 +489,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { taskName = taskName(dep, taskCls, map); } - catch (GridException e) { + catch (IgniteCheckedException e) { taskName = task.getClass().getName(); deployEx = e; @@ -529,13 +530,13 @@ public class GridTaskProcessor extends GridProcessorAdapter { GridTaskFutureImpl<R> fut = new GridTaskFutureImpl<>(ses, ctx); - GridException securityEx = null; + IgniteCheckedException securityEx = null; if (ctx.security().enabled() && deployEx == null) { try { saveTaskMetadata(taskName); } - catch (GridException e) { + catch (IgniteCheckedException e) { securityEx = e; } } @@ -640,10 +641,10 @@ public class GridTaskProcessor extends GridProcessorAdapter { * @param cls Class. * @param map Thread context map. * @return Task name. - * @throws GridException If {@link @GridComputeTaskName} annotation is found, but has empty value. + * @throws IgniteCheckedException If {@link @GridComputeTaskName} annotation is found, but has empty value. */ private String taskName(GridDeployment dep, Class<?> cls, - Map<GridTaskThreadContextKey, Object> map) throws GridException { + Map<GridTaskThreadContextKey, Object> map) throws IgniteCheckedException { assert dep != null; assert cls != null; assert map != null; @@ -656,7 +657,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { taskName = ann.value(); if (F.isEmpty(taskName)) - throw new GridException("Task name specified by @GridComputeTaskName annotation" + + throw new IgniteCheckedException("Task name specified by @GridComputeTaskName annotation" + " cannot be empty for class: " + cls); } else @@ -670,7 +671,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { * * @param taskName Task name. */ - private void saveTaskMetadata(String taskName) throws GridException { + private void saveTaskMetadata(String taskName) throws IgniteCheckedException { if (ctx.isDaemon()) return; @@ -690,7 +691,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { existingName = tasksMetaCache.putIfAbsent(key, taskName); if (existingName != null && !F.eq(existingName, taskName)) - throw new GridException("Task name hash collision for security-enabled node [taskName=" + taskName + + throw new IgniteCheckedException("Task name hash collision for security-enabled node [taskName=" + taskName + ", existing taskName=" + existingName + ']'); } @@ -721,9 +722,9 @@ public class GridTaskProcessor extends GridProcessorAdapter { /** * @param ses Task session. * @param attrs Attributes. - * @throws GridException Thrown in case of any errors. + * @throws IgniteCheckedException Thrown in case of any errors. */ - public void setAttributes(GridTaskSessionImpl ses, Map<?, ?> attrs) throws GridException { + public void setAttributes(GridTaskSessionImpl ses, Map<?, ?> attrs) throws IgniteCheckedException { long timeout = ses.getEndTime() - U.currentTimeMillis(); if (timeout <= 0) { @@ -744,11 +745,11 @@ public class GridTaskProcessor extends GridProcessorAdapter { * * @param attrs Deserialized session attributes. * @param ses Task session. - * @throws GridException If send to any of the jobs failed. + * @throws IgniteCheckedException If send to any of the jobs failed. */ @SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter", "BusyWait"}) private void sendSessionAttributes(Map<?, ?> attrs, GridTaskSessionImpl ses) - throws GridException { + throws IgniteCheckedException { assert attrs != null; assert ses != null; @@ -804,7 +805,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { ctx.event().record(evt); } - GridException ex = null; + IgniteCheckedException ex = null; // Every job gets an individual message to keep track of ghost requests. for (ComputeJobSibling s : ses.getJobSiblings()) { @@ -842,7 +843,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { timeout, false); } - catch (GridException e) { + catch (IgniteCheckedException e) { node = ctx.discovery().node(nodeId); if (node != null) { @@ -950,7 +951,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { sendSessionAttributes(attrs, ses); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to deserialize session request: " + msg, e); } finally { @@ -1108,7 +1109,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { ctx.io().removeMessageListener(s.taskTopic(), msgLsnr); } } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to unregister job communication message listeners and counters.", e); } } @@ -1202,7 +1203,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { try { siblings = worker.getSession().getJobSiblings(); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to get job siblings [request=" + msg + ", ses=" + worker.getSession() + ']', e); @@ -1233,7 +1234,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { loc ? null : marsh.marshal(siblings)), SYSTEM_POOL); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to send job sibling response.", e); } } @@ -1274,7 +1275,7 @@ public class GridTaskProcessor extends GridProcessorAdapter { try { gridTaskWorker.getTaskFuture().cancel(); } - catch (GridException e) { + catch (IgniteCheckedException e) { log.warning("Failed to cancel task: " + gridTaskWorker.getTask(), e); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java index 6165fbd..e89502f 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/task/GridTaskWorker.java @@ -132,7 +132,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { /** Continuous mapper. */ private final ComputeTaskContinuousMapper mapper = new ComputeTaskContinuousMapper() { /** {@inheritDoc} */ - @Override public void send(ComputeJob job, ClusterNode node) throws GridException { + @Override public void send(ComputeJob job, ClusterNode node) throws IgniteCheckedException { A.notNull(job, "job"); A.notNull(node, "node"); @@ -140,31 +140,31 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { } /** {@inheritDoc} */ - @Override public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) throws GridException { + @Override public void send(Map<? extends ComputeJob, ClusterNode> mappedJobs) throws IgniteCheckedException { A.notNull(mappedJobs, "mappedJobs"); processMappedJobs(mappedJobs); } /** {@inheritDoc} */ - @Override public void send(ComputeJob job) throws GridException { + @Override public void send(ComputeJob job) throws IgniteCheckedException { A.notNull(job, "job"); send(Collections.singleton(job)); } /** {@inheritDoc} */ - @Override public void send(Collection<? extends ComputeJob> jobs) throws GridException { + @Override public void send(Collection<? extends ComputeJob> jobs) throws IgniteCheckedException { A.notNull(jobs, "jobs"); if (jobs.isEmpty()) - throw new GridException("Empty jobs collection passed to send(...) method."); + throw new IgniteCheckedException("Empty jobs collection passed to send(...) method."); ComputeLoadBalancer balancer = ctx.loadBalancing().getLoadBalancer(ses, getTaskTopology()); for (ComputeJob job : jobs) { if (job == null) - throw new GridException("Null job passed to send(...) method."); + throw new IgniteCheckedException("Null job passed to send(...) method."); processMappedJobs(Collections.singletonMap(job, balancer.getBalancedNode(job, null))); } @@ -314,13 +314,13 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { /** * @param taskCls Task class. * @return Task instance. - * @throws GridException Thrown in case of any instantiation error. + * @throws IgniteCheckedException Thrown in case of any instantiation error. */ - private ComputeTask<T, R> newTask(Class<? extends ComputeTask<T, R>> taskCls) throws GridException { + private ComputeTask<T, R> newTask(Class<? extends ComputeTask<T, R>> taskCls) throws IgniteCheckedException { ComputeTask<T, R> task = dep.newInstance(taskCls); if (task == null) - throw new GridException("Failed to instantiate task (is default constructor available?): " + taskCls); + throw new IgniteCheckedException("Failed to instantiate task (is default constructor available?): " + taskCls); return task; } @@ -354,7 +354,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { try { task = newTask((Class<? extends ComputeTask<T, R>>)taskCls); } - catch (GridException e) { + catch (IgniteCheckedException e) { // If cannot instantiate task, then assign internal flag based // on information available. internal = dep.internalTask(null, taskCls); @@ -388,7 +388,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { Map<? extends ComputeJob, ClusterNode> mappedJobs = U.wrapThreadLoader(dep.classLoader(), new Callable<Map<? extends ComputeJob, ClusterNode>>() { - @Override public Map<? extends ComputeJob, ClusterNode> call() throws GridException { + @Override public Map<? extends ComputeJob, ClusterNode> call() throws IgniteCheckedException { return task.map(shuffledNodes, arg); } }); @@ -401,7 +401,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { synchronized (mux) { // Check if some jobs are sent from continuous mapper. if (F.isEmpty(jobRes)) - throw new GridException("Task map operation produced no mapped jobs: " + ses); + throw new IgniteCheckedException("Task map operation produced no mapped jobs: " + ses); } } else @@ -418,7 +418,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { finishTask(null, e); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!fut.isCancelled()) { U.error(log, "Failed to map task jobs to nodes: " + ses, e); @@ -440,9 +440,9 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { /** * @param jobs Map of jobs. - * @throws GridException Thrown in case of any error. + * @throws IgniteCheckedException Thrown in case of any error. */ - private void processMappedJobs(Map<? extends ComputeJob, ClusterNode> jobs) throws GridException { + private void processMappedJobs(Map<? extends ComputeJob, ClusterNode> jobs) throws IgniteCheckedException { if (F.isEmpty(jobs)) return; @@ -456,10 +456,10 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { ClusterNode node = mappedJob.getValue(); if (job == null) - throw new GridException("Job can not be null [mappedJob=" + mappedJob + ", ses=" + ses + ']'); + throw new IgniteCheckedException("Job can not be null [mappedJob=" + mappedJob + ", ses=" + ses + ']'); if (node == null) - throw new GridException("Node can not be null [mappedJob=" + mappedJob + ", ses=" + ses + ']'); + throw new IgniteCheckedException("Node can not be null [mappedJob=" + mappedJob + ", ses=" + ses + ']'); IgniteUuid jobId = IgniteUuid.fromUuid(node.id()); @@ -476,7 +476,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { synchronized (mux) { if (state != State.WAITING) - throw new GridException("Task is not in waiting state [state=" + state + ", ses=" + ses + ']'); + throw new IgniteCheckedException("Task is not in waiting state [state=" + state + ", ses=" + ses + ']'); // Do not add siblings if result cache is disabled. if (resCache) @@ -490,7 +490,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { // getting results while still sending out references. for (GridJobResultImpl res : jobResList) { if (jobRes.put(res.getJobContext().getJobId(), res) != null) - throw new GridException("Duplicate job ID for remote job found: " + res.getJobContext().getJobId()); + throw new IgniteCheckedException("Duplicate job ID for remote job found: " + res.getJobContext().getJobId()); res.setOccupied(true); @@ -524,9 +524,9 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { /** * @return Topology for this task. - * @throws GridException Thrown in case of any error. + * @throws IgniteCheckedException Thrown in case of any error. */ - private List<ClusterNode> getTaskTopology() throws GridException { + private List<ClusterNode> getTaskTopology() throws IgniteCheckedException { Collection<UUID> top = ses.getTopology(); Collection<? extends ClusterNode> subgrid = top != null ? ctx.discovery().nodes(top) : ctx.discovery().allNodes(); @@ -664,8 +664,8 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { Object res0 = loc ? res.getJobResult() : marsh.unmarshal(res.getJobResultBytes(), clsLdr); - GridException ex = loc ? res.getException() : - marsh.<GridException>unmarshal(res.getExceptionBytes(), clsLdr); + IgniteCheckedException ex = loc ? res.getException() : + marsh.<IgniteCheckedException>unmarshal(res.getExceptionBytes(), clsLdr); Map<Object, Object> attrs = loc ? res.getJobAttributes() : marsh.<Map<Object, Object>>unmarshal(res.getJobAttributesBytes(), clsLdr); @@ -675,7 +675,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { if (loc) ctx.resource().invokeAnnotated(dep, jobRes.getJob(), ComputeJobAfterSend.class); } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Error deserializing job response: " + res, e); finishTask(null, e); @@ -698,7 +698,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { String errMsg = "Failed to obtain remote job result policy for result from GridComputeTask.result(..) " + "method that returned null (will fail the whole task): " + jobRes; - finishTask(null, new GridException(errMsg)); + finishTask(null, new IgniteCheckedException(errMsg)); return; } @@ -762,7 +762,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { } } } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to obtain topology [ses=" + ses + ", err=" + e + ']', e); finishTask(null, e); @@ -806,7 +806,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { plc = task.result(jobRes, results); if (plc == FAILOVER && noFailover) { - GridException e = jobRes.getException(); + IgniteCheckedException e = jobRes.getException(); if (e != null) throw e; @@ -824,7 +824,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { return plc; } - catch (GridException e) { + catch (IgniteCheckedException e) { if (X.hasCause(e, GridInternalException.class) || X.hasCause(e, IgniteFsOutOfSpaceException.class)) { // Print internal exceptions only if debug is enabled. @@ -833,7 +833,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); } else if (X.hasCause(e, ComputeJobFailoverException.class)) { - GridException e0 = new GridException(" Job was not failed over because " + + 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); @@ -849,7 +849,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { return null; } - catch (GridRuntimeException e) { + catch (IgniteException e) { if (X.hasCause(e, GridInternalException.class) || X.hasCause(e, IgniteFsOutOfSpaceException.class)) { // Print internal exceptions only if debug is enabled. @@ -858,7 +858,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { "GridComputeTask.result(..) method (will fail the whole task): " + jobRes, e); } else if (X.hasCause(e, ComputeJobFailoverException.class)) { - GridException e0 = new GridException(" Job was not failed over because " + + 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); @@ -904,7 +904,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { try { // Reduce results. reduceRes = U.wrapThreadLoader(dep.classLoader(), new Callable<R>() { - @Nullable @Override public R call() throws GridException { + @Nullable @Override public R call() throws IgniteCheckedException { return task.reduce(results); } }); @@ -927,7 +927,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { userE = e; } - catch (GridException e) { + catch (IgniteCheckedException e) { U.error(log, "Failed to reduce job results for task: " + task, e); userE = e; @@ -1057,7 +1057,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { new GridJobCancelRequest(ses.getId(), res.getJobContext().getJobId(), /*courtesy*/true), PUBLIC_POOL); } - catch (GridException e) { + catch (IgniteCheckedException e) { if (!isDeadNode(nodeId)) U.error(log, "Failed to send cancel request to node (will ignore) [nodeId=" + nodeId + ", taskName=" + ses.getTaskName() + @@ -1182,7 +1182,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { U.warn(log, "Job timed out prior to sending job execution request: " + res.getJob()); } } - catch (GridException e) { + catch (IgniteCheckedException e) { boolean deadNode = isDeadNode(res.getNode().id()); // Avoid stack trace if node has left grid. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessor.java index c4d0015..8b7d944 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessor.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/timeout/GridTimeoutProcessor.java @@ -9,14 +9,15 @@ package org.gridgain.grid.kernal.processors.timeout; +import org.apache.ignite.*; import org.apache.ignite.thread.*; -import org.gridgain.grid.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.kernal.processors.*; import org.gridgain.grid.util.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.grid.util.worker.*; + import java.util.*; /** @@ -60,7 +61,7 @@ public class GridTimeoutProcessor extends GridProcessorAdapter { } /** {@inheritDoc} */ - @Override public void stop(boolean cancel) throws GridException { + @Override public void stop(boolean cancel) throws IgniteCheckedException { U.interrupt(timeoutWorker); U.join(timeoutWorker); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/06931b4b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java index fcbd13e..9b0caa4 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/VisorJob.java @@ -44,7 +44,7 @@ public abstract class VisorJob<A, R> extends ComputeJobAdapter { } /** {@inheritDoc} */ - @Nullable @Override public Object execute() throws GridException { + @Nullable @Override public Object execute() throws IgniteCheckedException { start = U.currentTimeMillis(); A arg = argument(0); @@ -66,5 +66,5 @@ public abstract class VisorJob<A, R> extends ComputeJobAdapter { * * @return Result. */ - protected abstract R run(@Nullable A arg) throws GridException; + protected abstract R run(@Nullable A arg) throws IgniteCheckedException; }