You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/09/07 11:17:16 UTC
[31/50] [abbrv] ignite git commit: WIP
WIP
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6e686a2c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6e686a2c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6e686a2c
Branch: refs/heads/ignite-2649
Commit: 6e686a2c2a1dc76a9bdc636f3208409568a18081
Parents: 06e6d23
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Sep 7 12:22:42 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Sep 7 12:22:42 2016 +0300
----------------------------------------------------------------------
.../internal/GridJobSiblingsResponse.java | 6 ++---
.../processors/job/GridJobProcessor.java | 28 +++++++++-----------
.../internal/processors/job/GridJobWorker.java | 10 +++----
3 files changed, 18 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e686a2c/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
index 55f332b..aa81cc5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridJobSiblingsResponse.java
@@ -24,7 +24,6 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.compute.ComputeJobSibling;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageReader;
import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -69,14 +68,13 @@ public class GridJobSiblingsResponse implements Message {
/**
* @param marsh Marshaller.
- * @param ctx kernal context.
* @throws IgniteCheckedException In case of error.
*/
- public void unmarshalSiblings(Marshaller marsh, final GridKernalContext ctx) throws IgniteCheckedException {
+ public void unmarshalSiblings(Marshaller marsh) throws IgniteCheckedException {
assert marsh != null;
if (siblingsBytes != null)
- siblings = MarshallerUtils.unmarshal(ctx.gridName(), marsh, siblingsBytes, null);
+ siblings = marsh.unmarshal(siblingsBytes, null);
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e686a2c/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 5938eb0..906d298 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
@@ -76,7 +76,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jsr166.ConcurrentHashMap8;
@@ -404,7 +403,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
boolean loc = ctx.localNodeId().equals(taskNode.id()) && !ctx.config().isMarshalLocalJobs();
GridTaskSessionRequest req = new GridTaskSessionRequest(ses.getId(), ses.getJobId(),
- loc ? null : MarshallerUtils.marshal(ctx, attrs), attrs);
+ loc ? null : marsh.marshal(attrs), attrs);
Object topic = TOPIC_TASK.topic(ses.getJobId(), ctx.discovery().localNode().id());
@@ -455,7 +454,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
if (res.jobSiblings() == null) {
try {
- res.unmarshalSiblings(marsh, ctx);
+ res.unmarshalSiblings(marsh);
}
catch (IgniteCheckedException e) {
U.error(log, "Failed to unmarshal job siblings.", e);
@@ -517,7 +516,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
ctx.io().send(taskNode, TOPIC_JOB_SIBLINGS,
new GridJobSiblingsRequest(ses.getId(),
loc ? topic : null,
- loc ? null : MarshallerUtils.marshal(ctx, topic)),
+ loc ? null : marsh.marshal(topic)),
SYSTEM_POOL);
// 4. Listen to discovery events.
@@ -1019,8 +1018,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
if (siblings0 == null) {
assert req.getSiblingsBytes() != null;
- siblings0 = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getSiblingsBytes(),
- U.resolveClassLoader(ctx.config()));
+ siblings0 = marsh.unmarshal(req.getSiblingsBytes(), U.resolveClassLoader(ctx.config()));
}
siblings = new ArrayList<>(siblings0);
@@ -1031,10 +1029,9 @@ public class GridJobProcessor extends GridProcessorAdapter {
if (req.isSessionFullSupport()) {
sesAttrs = req.getSessionAttributes();
- if (sesAttrs == null) {
- sesAttrs = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getSessionAttributesBytes(),
+ if (sesAttrs == null)
+ sesAttrs = marsh.unmarshal(req.getSessionAttributesBytes(),
U.resolveClassLoader(dep.classLoader(), ctx.config()));
- }
}
// Note that we unmarshal session/job attributes here with proper class loader.
@@ -1059,10 +1056,9 @@ public class GridJobProcessor extends GridProcessorAdapter {
Map<? extends Serializable, ? extends Serializable> jobAttrs = req.getJobAttributes();
- if (jobAttrs == null) {
- jobAttrs = MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getJobAttributesBytes(),
+ if (jobAttrs == null)
+ jobAttrs = marsh.unmarshal(req.getJobAttributesBytes(),
U.resolveClassLoader(dep.classLoader(), ctx.config()));
- }
jobCtx = new GridJobContextImpl(ctx, req.getJobId(), jobAttrs);
}
@@ -1334,11 +1330,11 @@ public class GridJobProcessor extends GridProcessorAdapter {
locNodeId,
req.getSessionId(),
req.getJobId(),
- loc ? null : MarshallerUtils.marshal(ctx, ex),
+ loc ? null : marsh.marshal(ex),
ex,
- loc ? null : MarshallerUtils.marshal(ctx, null),
+ loc ? null : marsh.marshal(null),
null,
- loc ? null : MarshallerUtils.marshal(ctx, null),
+ loc ? null : marsh.marshal(null),
null,
false);
@@ -1429,7 +1425,7 @@ public class GridJobProcessor extends GridProcessorAdapter {
boolean loc = ctx.localNodeId().equals(nodeId) && !ctx.config().isMarshalLocalJobs();
Map<?, ?> attrs = loc ? req.getAttributes() :
- (Map<?, ?>)MarshallerUtils.unmarshal(ctx.gridName(), marsh, req.getAttributesBytes(),
+ (Map<?, ?>)marsh.unmarshal(req.getAttributesBytes(),
U.resolveClassLoader(ses.getClassLoader(), ctx.config()));
if (ctx.event().isRecordable(EVT_TASK_SESSION_ATTR_SET)) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e686a2c/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
index 39457e7..164c9e7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
@@ -54,7 +54,6 @@ import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.events.EventType.EVT_JOB_CANCELLED;
@@ -407,8 +406,7 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
try {
if (job == null) {
- job = MarshallerUtils.unmarshal(ctx.gridName(), marsh, jobBytes,
- U.resolveClassLoader(dep.classLoader(), ctx.config()));
+ job = marsh.unmarshal(jobBytes, U.resolveClassLoader(dep.classLoader(), ctx.config()));
// No need to hold reference any more.
jobBytes = null;
@@ -746,11 +744,11 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
ctx.localNodeId(),
ses.getId(),
ses.getJobId(),
- loc ? null : MarshallerUtils.marshal(ctx, ex),
+ loc ? null : marsh.marshal(ex),
loc ? ex : null,
- loc ? null: MarshallerUtils.marshal(ctx, res),
+ loc ? null: marsh.marshal(res),
loc ? res : null,
- loc ? null : MarshallerUtils.marshal(ctx, attrs),
+ loc ? null : marsh.marshal(attrs),
loc ? attrs : null,
isCancelled());