ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4932 WIP
Date Fri, 14 Apr 2017 12:54:18 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4932 5e9e146fb -> 788c3fb6c


ignite-4932 WIP


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

Branch: refs/heads/ignite-4932
Commit: 788c3fb6c63474a23d1656d8469668d9bbc67149
Parents: 5e9e146
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Apr 14 15:54:14 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Apr 14 15:54:14 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteGetFromComputeBenchmark.java    | 21 ++++++--------------
 1 file changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/788c3fb6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java
index 1a82fc7..66aec82 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetFromComputeBenchmark.java
@@ -39,6 +39,9 @@ import static org.yardstickframework.BenchmarkUtils.println;
  */
 public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark<Integer,
Object> {
     /** */
+    private static final String CACHE_NAME = "atomic-offheap";
+
+    /** */
     private IgniteCompute compute;
 
     /** */
@@ -79,8 +82,6 @@ public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark<
 
         compute = ignite().compute();
 
-        GetClosure.cacheName = cacheName;
-
         asyncCache = cache().withAsync();
     }
 
@@ -101,21 +102,14 @@ public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark<
 
         int key = nextRandom(args.range());
 
-        compute.affinityCall(cacheName(), key, new GetClosure(key));
+        compute.affinityCall(CACHE_NAME, key, new GetClosure(key));
 
         return true;
     }
 
     /** {@inheritDoc} */
     @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache(cacheName());
-    }
-
-    /**
-     * @return Cache name.
-     */
-    protected String cacheName() {
-        return "atomic-offheap";
+        return ignite().cache(CACHE_NAME);
     }
 
     /**
@@ -123,9 +117,6 @@ public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark<
      */
     public static class GetClosure implements IgniteCallable<Object> {
         /** */
-        static String cacheName;
-
-        /** */
         @IgniteInstanceResource
         private Ignite ignite;
 
@@ -141,7 +132,7 @@ public class IgniteGetFromComputeBenchmark extends IgniteCacheAbstractBenchmark<
 
         /** {@inheritDoc} */
         @Override public Object call() throws Exception {
-            return ignite.cache(cacheName).get(key);
+            return ignite.cache(CACHE_NAME).get(key);
         }
     }
 


Mime
View raw message