ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [04/20] incubator-ignite git commit: #ignite-965: add map reduce Javadoc
Date Tue, 23 Jun 2015 17:47:30 GMT
#ignite-965: add map reduce Javadoc


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

Branch: refs/heads/ignite-965
Commit: 30ec9f75f7198beea1465ea2c50391f29b2f5375
Parents: d24ba84
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Tue Jun 23 19:05:10 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Tue Jun 23 19:05:10 2015 +0300

----------------------------------------------------------------------
 .../IgniteComputeTaskCommandHandler.java        |  1 -
 modules/nodejs/src/main/js/cache.js             | 19 ++++-------
 modules/nodejs/src/main/js/compute.js           | 33 ++++++++++++++++++++
 modules/nodejs/src/main/js/server.js            |  6 ++--
 .../testsuites/IgniteNodeJsTestSuite.java       |  1 +
 5 files changed, 43 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30ec9f75/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/compute/IgniteComputeTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/compute/IgniteComputeTaskCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/compute/IgniteComputeTaskCommandHandler.java
index 8de073c..33f4893 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/compute/IgniteComputeTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/compute/IgniteComputeTaskCommandHandler.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.resources.*;
 import org.jetbrains.annotations.*;
 
-import javax.script.*;
 import java.util.*;
 
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30ec9f75/modules/nodejs/src/main/js/cache.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/cache.js b/modules/nodejs/src/main/js/cache.js
index ee4452e..8a62be9 100644
--- a/modules/nodejs/src/main/js/cache.js
+++ b/modules/nodejs/src/main/js/cache.js
@@ -32,18 +32,11 @@ function Cache(server, cacheName) {
 }
 
 /**
- * Callback for cache get
- * @callback Cache~onGet
- * @param {string} error Error
- * @param {string} result Result value
- */
-
-/**
  * Get cache value
  *
  * @this {Cache}
  * @param {string} key Key
- * @param {Cache~onGet} callback Called on finish
+ * @param {onGet} callback Called on finish
  */
 Cache.prototype.get = function(key, callback) {
   this._server.runCommand("get", [this._cacheNameParam, Server.pair("key", key)], callback);
@@ -51,7 +44,7 @@ Cache.prototype.get = function(key, callback) {
 
 /**
  * Callback for cache put
- * @callback Cache~noValue
+ * @callback noValue
  * @param {string} error Error
  */
 
@@ -61,7 +54,7 @@ Cache.prototype.get = function(key, callback) {
  * @this {Cache}
  * @param {string} key Key
  * @param {string} value Value
- * @param {Cache~noValue} callback Called on finish
+ * @param {noValue} callback Called on finish
  */
 Cache.prototype.put = function(key, value, callback) {
   this._server.runCommand("put", [this._cacheNameParam, Server.pair("key", key), Server.pair("val",
value)],
@@ -73,7 +66,7 @@ Cache.prototype.put = function(key, value, callback) {
  *
  * @this {Cache}
  * @param {string} key Key
- * @param {Cache~noValue} callback Called on finish
+ * @param {noValue} callback Called on finish
  */
 Cache.prototype.remove = function(key, callback) {
   this._server.runCommand("rmv", [this._cacheNameParam, Server.pair("key", key)], callback);
@@ -84,7 +77,7 @@ Cache.prototype.remove = function(key, callback) {
  *
  * @this {Cache}
  * @param {string[]} keys Keys to remove
- * @param {Cache~noValue} callback Called on finish
+ * @param {noValue} callback Called on finish
  */
 Cache.prototype.removeAll = function(keys, callback) {
   var params = [this._cacheNameParam];
@@ -99,7 +92,7 @@ Cache.prototype.removeAll = function(keys, callback) {
  *
  * @this {Cache}
  * @param {Object.<string, string>} collection of entries to put in the cache
- * @param {Cache~noValue} callback Called on finish
+ * @param {noValue} callback Called on finish
  */
 Cache.prototype.putAll = function(map, callback) {
   var keys = Object.keys(map);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30ec9f75/modules/nodejs/src/main/js/compute.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/compute.js b/modules/nodejs/src/main/js/compute.js
index 7a5f808..7f45f5b 100644
--- a/modules/nodejs/src/main/js/compute.js
+++ b/modules/nodejs/src/main/js/compute.js
@@ -81,4 +81,37 @@ Compute.prototype.execute = function(map, reduce, arg, callback) {
     this._server.runCommand("exectask", params, callback);
 }
 
+/**
+ * @name EmitFunction
+ * @function
+ * @param {function} func Remote job
+ * @param {string[]} args Arguments for remote job
+ * @param {string} node Node Id to call job on.
+ */
+
+/**
+ * @name MapFunction
+ * @function
+ * @param {string[]} nodes Nodes Id
+ * @param {string} arg Argument
+ * @param {EmitFunction} emit Emit function to call for adding to result
+ */
+
+/**
+ * @name ReduceFunction
+ * @function
+ * @param {string[]} results Results of executing jobs after mapping
+ * @returns {string} Result
+ */
+
+/**
+ * @this{Compute}
+ * @param {MapFunction} map Map function
+ * @param {ReduceFunction} reduce Reduce function
+ * @param {string} arg Argument
+ * @param {onGet} callback Callback
+ */
+Compute.prototype._mapWrapper = function(map) {
+
+}
 exports.Compute = Compute

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30ec9f75/modules/nodejs/src/main/js/server.js
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/main/js/server.js b/modules/nodejs/src/main/js/server.js
index d4660ae..c1b52c0 100644
--- a/modules/nodejs/src/main/js/server.js
+++ b/modules/nodejs/src/main/js/server.js
@@ -43,7 +43,7 @@ Server.prototype.host = function() {
 /**
  * Callback for Server runCommand
  *
- * @callback Server~onRunCommand
+ * @callback onGet
  * @param {string} error Error
  * @param {string} result Result value
  */
@@ -54,7 +54,7 @@ Server.prototype.host = function() {
  * @this {Server}
  * @param {string} cmdName command name.
  * @param params Parameters for command.
- * @param {Server~onRunCommand} Called on finish
+ * @param {onGet} Called on finish
  */
 Server.prototype.runCommand = function(cmdName, params, callback) {
   var paramsString = "";
@@ -126,7 +126,7 @@ Server.prototype.runCommand = function(cmdName, params, callback) {
  * Check the connection with server node.
  *
  * @this {Server}
- * @param {Server~onRunCommand} callback Called on finish
+ * @param {onGet} callback Called on finish
  */
 Server.prototype.checkConnection = function(callback) {
   this.runCommand("version", [], callback);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/30ec9f75/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
b/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
index 9d5daee..eb69d7f 100644
--- a/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
+++ b/modules/nodejs/src/test/java/org/apache/ignite/testsuites/IgniteNodeJsTestSuite.java
@@ -34,6 +34,7 @@ public class IgniteNodeJsTestSuite extends TestSuite {
         suite.addTest(new TestSuite(NodeJsIgnitionSelfTest.class));
         suite.addTest(new TestSuite(NodeJsCacheApiSelfTest.class));
         suite.addTest(new TestSuite(NodeJsSecretKeySelfTest.class));
+        suite.addTest(new TestSuite(NodeJsComputeSelfTest.class));
 
         return suite;
     }


Mime
View raw message