Repository: incubator-ignite Updated Branches: refs/heads/ignite-368 43f183db8 -> f7bf6d3a2
# IGNITE-368 Renaming. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f7bf6d3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f7bf6d3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f7bf6d3a Branch: refs/heads/ignite-368 Commit: f7bf6d3a273c311f1ad40f560bcaa0d9886d61e2 Parents: 43f183d Author: AKuznetsov <akuznet...@gridgain.com> Authored: Fri Mar 13 14:50:43 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Fri Mar 13 14:50:43 2015 +0700 ---------------------------------------------------------------------- .../visor/node/VisorNodeLastErrorsTask.java | 99 -------------------- .../node/VisorNodeSuppressedErrorsTask.java | 99 ++++++++++++++++++++ .../resources/META-INF/classnames.properties | 4 +- 3 files changed, 101 insertions(+), 101 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f7bf6d3a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java deleted file mode 100644 index 2a5beaa..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeLastErrorsTask.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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.visor.node; - -import org.apache.ignite.compute.*; -import org.apache.ignite.internal.processors.task.*; -import org.apache.ignite.internal.util.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.apache.ignite.internal.visor.*; -import org.apache.ignite.lang.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -/** - * Task to collect last errors on nodes. - */ -@GridInternal -public class VisorNodeLastErrorsTask extends VisorMultiNodeTask<Map<UUID, Long>, - Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>>, - IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> { - /** */ - private static final long serialVersionUID = 0L; - - /** {@inheritDoc} */ - @Override protected VisorNodeLastErrorsJob job(Map<UUID, Long> arg) { - return new VisorNodeLastErrorsJob(arg, debug); - } - - /** {@inheritDoc} */ - @Nullable @Override protected Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> - reduce0(List<ComputeJobResult> results) { - Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> taskRes = - new HashMap<>(results.size()); - - for (ComputeJobResult res : results) { - IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>> jobRes = res.getData(); - - taskRes.put(res.getNode().id(), jobRes); - } - - return taskRes; - } - - /** - * Job to collect last errors on nodes. - */ - private static class VisorNodeLastErrorsJob extends VisorJob<Map<UUID, Long>, - IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> { - /** */ - private static final long serialVersionUID = 0L; - - /** - * Create job with given argument. - * - * @param arg Map with last error counter. - * @param debug Debug flag. - */ - private VisorNodeLastErrorsJob(Map<UUID, Long> arg, boolean debug) { - super(arg, debug); - } - - /** {@inheritDoc} */ - @Override protected IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>> run(Map<UUID, Long> arg) { - Long lastOrder = arg.get(ignite.localNode().id()); - - long order = lastOrder != null ? lastOrder : 0; - - List<IgniteExceptionRegistry.ExceptionInfo> errors = ignite.context().exceptionRegistry().getErrors(order); - - for (IgniteExceptionRegistry.ExceptionInfo error : errors) { - if (error.order() > order) - order = error.order(); - } - - return new IgniteBiTuple<>(order, errors); - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(VisorNodeLastErrorsJob.class, this); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f7bf6d3a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java new file mode 100644 index 0000000..8b39d09 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeSuppressedErrorsTask.java @@ -0,0 +1,99 @@ +/* + * 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.visor.node; + +import org.apache.ignite.compute.*; +import org.apache.ignite.internal.processors.task.*; +import org.apache.ignite.internal.util.*; +import org.apache.ignite.internal.util.typedef.internal.*; +import org.apache.ignite.internal.visor.*; +import org.apache.ignite.lang.*; +import org.jetbrains.annotations.*; + +import java.util.*; + +/** + * Task to collect last errors on nodes. + */ +@GridInternal +public class VisorNodeSuppressedErrorsTask extends VisorMultiNodeTask<Map<UUID, Long>, + Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>>, + IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> { + /** */ + private static final long serialVersionUID = 0L; + + /** {@inheritDoc} */ + @Override protected VisorNodeSuppressedErrorsJob job(Map<UUID, Long> arg) { + return new VisorNodeSuppressedErrorsJob(arg, debug); + } + + /** {@inheritDoc} */ + @Nullable @Override protected Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> + reduce0(List<ComputeJobResult> results) { + Map<UUID, IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> taskRes = + new HashMap<>(results.size()); + + for (ComputeJobResult res : results) { + IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>> jobRes = res.getData(); + + taskRes.put(res.getNode().id(), jobRes); + } + + return taskRes; + } + + /** + * Job to collect last errors on nodes. + */ + private static class VisorNodeSuppressedErrorsJob extends VisorJob<Map<UUID, Long>, + IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>>> { + /** */ + private static final long serialVersionUID = 0L; + + /** + * Create job with given argument. + * + * @param arg Map with last error counter. + * @param debug Debug flag. + */ + private VisorNodeSuppressedErrorsJob(Map<UUID, Long> arg, boolean debug) { + super(arg, debug); + } + + /** {@inheritDoc} */ + @Override protected IgniteBiTuple<Long, List<IgniteExceptionRegistry.ExceptionInfo>> run(Map<UUID, Long> arg) { + Long lastOrder = arg.get(ignite.localNode().id()); + + long order = lastOrder != null ? lastOrder : 0; + + List<IgniteExceptionRegistry.ExceptionInfo> errors = ignite.context().exceptionRegistry().getErrors(order); + + for (IgniteExceptionRegistry.ExceptionInfo error : errors) { + if (error.order() > order) + order = error.order(); + } + + return new IgniteBiTuple<>(order, errors); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(VisorNodeSuppressedErrorsJob.class, this); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f7bf6d3a/modules/core/src/main/resources/META-INF/classnames.properties ---------------------------------------------------------------------- diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties index d533f53..ab186d3 100644 --- a/modules/core/src/main/resources/META-INF/classnames.properties +++ b/modules/core/src/main/resources/META-INF/classnames.properties @@ -1469,14 +1469,14 @@ org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask$VisorNodeEven org.apache.ignite.internal.visor.node.VisorNodeEventsCollectorTask$VisorNodeEventsCollectorTaskArg org.apache.ignite.internal.visor.node.VisorNodeGcTask org.apache.ignite.internal.visor.node.VisorNodeGcTask$VisorNodeGcJob -org.apache.ignite.internal.visor.node.VisorNodeLastErrorsTask -org.apache.ignite.internal.visor.node.VisorNodeLastErrorsTask$VisorNodeLastErrorsJob org.apache.ignite.internal.visor.node.VisorNodePingTask org.apache.ignite.internal.visor.node.VisorNodePingTask$VisorNodePingJob org.apache.ignite.internal.visor.node.VisorNodeRestartTask org.apache.ignite.internal.visor.node.VisorNodeRestartTask$VisorNodesRestartJob org.apache.ignite.internal.visor.node.VisorNodeStopTask org.apache.ignite.internal.visor.node.VisorNodeStopTask$VisorNodesStopJob +org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrorsTask +org.apache.ignite.internal.visor.node.VisorNodeSuppressedErrorsTask$VisorNodeSuppressedErrorsJob org.apache.ignite.internal.visor.node.VisorPeerToPeerConfiguration org.apache.ignite.internal.visor.node.VisorQueryConfiguration org.apache.ignite.internal.visor.node.VisorRestConfiguration