ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/4] incubator-ignite git commit: #ignite-106: Rename var g to ignite in scala examples.
Date Tue, 03 Feb 2015 22:43:56 GMT
#ignite-106: Rename var g to ignite in scala examples.


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

Branch: refs/heads/ignite-106-2
Commit: 7a5c0979a32b4a25c8c2b979f787051c3860c10c
Parents: 5e889cd
Author: ivasilinets <vasilinetc.ira@gmail.com>
Authored: Wed Feb 4 01:40:51 2015 +0300
Committer: ivasilinets <vasilinetc.ira@gmail.com>
Committed: Wed Feb 4 01:40:51 2015 +0300

----------------------------------------------------------------------
 .../scalar/examples/ScalarCacheAffinityExample1.scala     | 10 +++++-----
 .../ignite/scalar/examples/ScalarCacheQueryExample.scala  |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a5c0979/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
index d85a5ec..cf6fca1 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
@@ -102,15 +102,15 @@ object ScalarCacheAffinityExample1 {
      * cache is not started on local node. In that case a job which populates
      * the cache will be sent to the node where cache is started.
      *
-     * @param g Grid.
+     * @param ignite Ignite.
      * @param keys Keys to populate.
      */
-    private def populateCache(g: Ignite, keys: Seq[String]) {
-        var prj = g.cluster().forCacheNodes(NAME)
+    private def populateCache(ignite: Ignite, keys: Seq[String]) {
+        var prj = ignite.cluster().forCacheNodes(NAME)
 
         // Give preference to local node.
-        if (prj.nodes().contains(g.cluster().localNode))
-            prj = g.cluster().forLocal()
+        if (prj.nodes().contains(ignite.cluster().localNode))
+            prj = ignite.cluster().forLocal()
 
         // Populate cache on some node (possibly this node) which has cache with given name
started.
         prj.run$(() => {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7a5c0979/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
index 0b2a71f..fdff4d4 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
@@ -52,9 +52,9 @@ object ScalarCacheQueryExample {
     /**
      * Runs the example.
      *
-     * @param g Grid instance to use.
+     * @param ignite Ignite instance to use.
      */
-    private def example(g: Ignite) {
+    private def example(ignite: Ignite) {
         // Populate cache.
         initialize()
 
@@ -64,7 +64,7 @@ object ScalarCacheQueryExample {
         // Using distributed queries for partitioned cache and local queries for replicated
cache.
         // Since in replicated caches data is available on all nodes, including local one,
         // it is enough to just query the local node.
-        val prj = if (cache$(CACHE_NAME).get.configuration.getCacheMode == PARTITIONED) g.cluster()
else g.cluster().forLocal()
+        val prj = if (cache$(CACHE_NAME).get.configuration.getCacheMode == PARTITIONED) ignite.cluster()
else ignite.cluster().forLocal()
 
         // Example for SQL-based querying employees based on salary ranges.
         // Gets all persons with 'salary > 1000'.


Mime
View raw message