ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [09/10] ignite git commit: Added node selection strategy.
Date Thu, 28 Jul 2016 11:05:51 GMT
Added node selection strategy.


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

Branch: refs/heads/ignite-3553
Commit: 240b0d19323f846e4684701d199732f77cab79bf
Parents: 5169cbf
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Jul 27 16:28:17 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Jul 27 16:28:17 2016 +0300

----------------------------------------------------------------------
 .../igfs/client/IgfsClientManager.java          | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/240b0d19/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientManager.java
index 05bbec1..5ba8019 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientManager.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.igfs.client;
 
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.igfs.IgfsException;
@@ -192,6 +193,13 @@ public class IgfsClientManager extends IgfsManager {
      */
     public <T> IgniteInternalFuture<T> executeAsync(IgfsContext igfsCtx, IgfsClientAbstractCallable<T>
clo,
         IgfsClientNodeSelectionStrategy strategy) {
+        try {
+
+            ClusterNode node = selectNode(igfsCtx, strategy);
+        }
+        catch (IgniteCheckedException e) {
+            // TODO
+        }
 
         // TODO
 
@@ -199,6 +207,19 @@ public class IgfsClientManager extends IgfsManager {
     }
 
     /**
+     * Select the most appropriate node for the task.
+     *
+     * @param igfsCtx IGFS context.
+     * @param strategy Strategy.
+     * @return Node.
+     * @throws IgniteCheckedException If failed to find the node.
+     */
+    private ClusterNode selectNode(IgfsContext igfsCtx, IgfsClientNodeSelectionStrategy strategy)
+        throws IgniteCheckedException {
+        // TODO
+    }
+
+    /**
      * Create closure response.
      *
      * @param msgId Message ID.


Mime
View raw message