You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by iv...@apache.org on 2015/07/05 21:23:19 UTC
incubator-ignite git commit: #ignite-964: remove unused operations
for java8.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-964-1 77e6c5ca8 -> b8596b601
#ignite-964: remove unused operations for java8.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b8596b60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b8596b60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b8596b60
Branch: refs/heads/ignite-964-1
Commit: b8596b601910c0c4cfb1d9b39dcee2633ae7d338
Parents: 77e6c5c
Author: ivasilinets <iv...@gridgain.com>
Authored: Sun Jul 5 22:23:12 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Sun Jul 5 22:23:12 2015 +0300
----------------------------------------------------------------------
.../http/jetty/IgniteScriptingCommandHandler.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b8596b60/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/IgniteScriptingCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/IgniteScriptingCommandHandler.java b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/IgniteScriptingCommandHandler.java
index 558e232..400f421 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/IgniteScriptingCommandHandler.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/IgniteScriptingCommandHandler.java
@@ -17,7 +17,6 @@
package org.apache.ignite.internal.processors.rest.protocols.http.jetty;
-import net.sf.json.*;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
@@ -92,7 +91,8 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
case RUN_SCRIPT: {
assert req instanceof RestRunScriptRequest : "Invalid type of run script request.";
- return ctx.closure().callLocalSafe(new RunScriptCallable(ctx, (RestRunScriptRequest) req), false);
+ return ctx.closure().callLocalSafe(
+ new RunScriptCallable(ctx, (RestRunScriptRequest) req), false);
}
case EXECUTE_MAP_REDUCE_SCRIPT: {
@@ -178,8 +178,7 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
data[i] = results.get(i).getData();
}
- Object o = ctx.scripting().invokeJSFunction(reduceFunc, JSONSerializer.toJSON(data), null);
- return o;
+ return ctx.scripting().invokeFunction(reduceFunc, data, null);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -218,9 +217,7 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
/** {@inheritDoc} */
@Override public Object execute() throws IgniteException {
try {
- return ((IgniteKernal)ignite).context().scripting().invokeFunction(func,
- RestJSONCacheObject.convertToRestObject(JSONCacheObject.toSimpleObject(argv)),
- null);
+ return ((IgniteKernal)ignite).context().scripting().invokeFunction(func, argv, null);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
@@ -317,7 +314,8 @@ public class IgniteScriptingCommandHandler extends GridRestCommandHandlerAdapter
* @param req Run script request.
* @param emitRes Emit function results.
*/
- public MapReduceCallable(GridKernalContext ctx, RestMapReduceScriptRequest req,IgniteJsEmitResult emitRes) {
+ public MapReduceCallable(GridKernalContext ctx, RestMapReduceScriptRequest req,
+ IgniteJsEmitResult emitRes) {
this.ctx = ctx;
this.req = req;
this.emitRes = emitRes;