ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/7] incubator-ignite git commit: #ignite-965: use ClusterNodes on map function.
Date Wed, 24 Jun 2015 12:48:36 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-965 cb0407ddb -> fbe541306


#ignite-965: use ClusterNodes on map function.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d20d9033
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d20d9033
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d20d9033

Branch: refs/heads/ignite-965
Commit: d20d9033104e9468d71e81f79ed0925a88c1840b
Parents: cb0407d
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Wed Jun 24 14:44:40 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Wed Jun 24 14:44:40 2015 +0300

----------------------------------------------------------------------
 .../scripting/IgniteScriptingCommandHandler.java         | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d20d9033/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
index ff56d88..c03a48a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/scripting/IgniteScriptingCommandHandler.java
@@ -160,22 +160,15 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
             try {
                 Map<ComputeJob, ClusterNode> map = new HashMap<>();
 
-                String[] ids = new String[nodes.size()];
-
-                for (int i = 0; i < ids.length; ++i)
-                    ids[i] = nodes.get(i).id().toString();
-
                 List jsMapRes = (List)ctx.scripting().invokeFunctionByName("__compute",
-                    mapFunc, ids, this.arg);
+                    mapFunc, nodes.toArray(new ClusterNode[nodes.size()]), this.arg);
 
                 for (Object jobMapping : jsMapRes) {
                     List task = (List)jobMapping;
 
                     final String func = (String)task.get(0);
                     final List argv = (List)task.get(1);
-                    String nodeId = (String)task.get(2);
-
-                    ClusterNode node = ctx.grid().cluster().node(UUID.fromString(nodeId));
+                    ClusterNode node = (ClusterNode)task.get(2);
 
                     map.put(new ComputeJobAdapter() {
                         @IgniteInstanceResource


Mime
View raw message