# sprint-1
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/70678bee Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/70678bee Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/70678bee Branch: refs/heads/ignite-24 Commit: 70678bee230271db2f2fae80ae710b791bbf8fd3 Parents: 1f1f0b6 Author: sboikov <sboi...@gridgain.com> Authored: Fri Jan 23 17:24:09 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Fri Jan 23 17:24:09 2015 +0300 ---------------------------------------------------------------------- .../processors/job/GridJobProcessor.java | 3 -- .../processors/task/GridTaskWorker.java | 28 +---------- .../internal/GridJobStealingSelfTest.java | 4 +- .../ignite/tests/p2p/ExcludeNodeFilter.java | 52 ++++++++++++++++++++ .../ignite/tests/p2p/GridExcludeNodeFilter.java | 52 -------------------- 5 files changed, 55 insertions(+), 84 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java index ece55f5..416d756 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobProcessor.java @@ -57,9 +57,6 @@ public class GridJobProcessor extends GridProcessorAdapter { /** */ private static final int FINISHED_JOBS_COUNT = Integer.getInteger(GG_JOBS_HISTORY_SIZE, 10240); - /** Version when subject ID was added. */ - public static final IgniteProductVersion SUBJECT_ID_ADDED_SINCE_VER = IgniteProductVersion.fromString("6.2.1"); - /** */ private final IgniteMarshaller marsh; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java ---------------------------------------------------------------------- diff --git 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 index b032994..65a3250 100644 --- 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 @@ -1119,33 +1119,7 @@ class GridTaskWorker<T, R> extends GridWorker implements GridTimeoutObject { boolean forceLocDep = internal || !ctx.deploy().enabled(); - req = node.version().compareTo(GridJobProcessor.SUBJECT_ID_ADDED_SINCE_VER) < 0 ? - new GridJobExecuteRequest( - ses.getId(), - res.getJobContext().getJobId(), - ses.getTaskName(), - ses.getUserVersion(), - ses.getTaskClassName(), - loc ? null : marsh.marshal(res.getJob()), - loc ? res.getJob() : null, - ses.getStartTime(), - timeout, - ses.getTopology(), - loc ? null : marsh.marshal(ses.getJobSiblings()), - loc ? ses.getJobSiblings() : null, - loc ? null : marsh.marshal(sesAttrs), - loc ? sesAttrs : null, - loc ? null: marsh.marshal(jobAttrs), - loc ? jobAttrs : null, - ses.getCheckpointSpi(), - dep.classLoaderId(), - dep.deployMode(), - continuous, - dep.participants(), - forceLocDep, - ses.isFullSupport(), - internal) : - new GridJobExecuteRequestV2( + req = new GridJobExecuteRequestV2( ses.getId(), res.getJobContext().getJobId(), ses.getTaskName(), http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java index d918ccb..5831bd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java @@ -256,8 +256,8 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { ClassLoader ldr1 = new URLClassLoader(clsLdrUrls, getClass().getClassLoader()); - Class taskCls = ldr1.loadClass("org.gridgain.grid.tests.p2p.JobStealingTask"); - Class nodeFilterCls = ldr1.loadClass("org.gridgain.grid.tests.p2p.GridExcludeNodeFilter"); + Class taskCls = ldr1.loadClass("org.apache.ignite.tests.p2p.JobStealingTask"); + Class nodeFilterCls = ldr1.loadClass("org.apache.ignite.tests.p2p.ExcludeNodeFilter"); IgnitePredicate<ClusterNode> nodeFilter = (IgnitePredicate<ClusterNode>)nodeFilterCls .getConstructor(UUID.class).newInstance(ignite2.cluster().localNode().id()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/ExcludeNodeFilter.java ---------------------------------------------------------------------- diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/ExcludeNodeFilter.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/ExcludeNodeFilter.java new file mode 100644 index 0000000..1384e18 --- /dev/null +++ b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/ExcludeNodeFilter.java @@ -0,0 +1,52 @@ +/* + * 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.tests.p2p; + +import org.apache.ignite.cluster.*; +import org.apache.ignite.lang.*; +import org.apache.ignite.internal.util.typedef.internal.*; + +import java.util.*; + +/** + * This node filter excludes the node with the given UUID + * from the topology. + */ +public class ExcludeNodeFilter implements IgnitePredicate<ClusterNode> { + /** Node ID to exclude. */ + private final UUID excludeId; + + /** + * @param excludeId Excluded node UUID. + */ + public ExcludeNodeFilter(UUID excludeId) { + assert excludeId != null; + + this.excludeId = excludeId; + } + + /** {@inheritDoc} */ + @Override public boolean apply(ClusterNode e) { + return !excludeId.equals(e.id()); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(ExcludeNodeFilter.class, this); + } +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70678bee/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExcludeNodeFilter.java ---------------------------------------------------------------------- diff --git a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExcludeNodeFilter.java b/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExcludeNodeFilter.java deleted file mode 100644 index 85d0ffa..0000000 --- a/modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/GridExcludeNodeFilter.java +++ /dev/null @@ -1,52 +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.tests.p2p; - -import org.apache.ignite.cluster.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.internal.util.typedef.internal.*; - -import java.util.*; - -/** - * This node filter excludes the node with the given UUID - * from the topology. - */ -public class GridExcludeNodeFilter implements IgnitePredicate<ClusterNode> { - /** Node ID to exclude. */ - private final UUID excludeId; - - /** - * @param excludeId Excluded node UUID. - */ - public GridExcludeNodeFilter(UUID excludeId) { - assert excludeId != null; - - this.excludeId = excludeId; - } - - /** {@inheritDoc} */ - @Override public boolean apply(ClusterNode e) { - return !excludeId.equals(e.id()); - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(GridExcludeNodeFilter.class, this); - } -}