ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ag...@apache.org
Subject [05/18] ignite git commit: IGNITE-4905 DML benchmarks ClassCastException fix - Fixes #1722.
Date Sun, 09 Apr 2017 13:51:28 GMT
IGNITE-4905 DML benchmarks ClassCastException fix - Fixes #1722.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/ignite-4003
Commit: 77740bf6fa72b1e669196b945165d59ecb8daeed
Parents: a6d518d
Author: Alexander Paschenko <alexander.a.paschenko@gmail.com>
Authored: Fri Apr 7 17:12:20 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Apr 7 17:12:20 2017 +0300

----------------------------------------------------------------------
 .../yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java   | 5 +++--
 .../yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java   | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/77740bf6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
index 218e8dc..19c40e3 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlDeleteFilteredBenchmark.java
@@ -20,6 +20,7 @@ package org.apache.ignite.yardstick.cache.dml;
 import java.util.Map;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.yardstick.cache.IgniteCacheAbstractBenchmark;
@@ -39,7 +40,7 @@ public class IgniteSqlDeleteFilteredBenchmark extends IgniteCacheAbstractBenchma
     private AtomicInteger delCnt = new AtomicInteger();
 
     /** */
-    private AtomicInteger delItemsCnt = new AtomicInteger();
+    private AtomicLong delItemsCnt = new AtomicLong();
 
     /** {@inheritDoc} */
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
@@ -55,7 +56,7 @@ public class IgniteSqlDeleteFilteredBenchmark extends IgniteCacheAbstractBenchma
 
             double maxSalary = salary + 1000;
 
-            int res = (Integer) cache().query(new SqlFieldsQuery("delete from Person where
salary >= ? and salary <= ?")
+            Long res = (Long)cache().query(new SqlFieldsQuery("delete from Person where salary
>= ? and salary <= ?")
                 .setArgs(salary, maxSalary)).getAll().get(0).get(0);
 
             delItemsCnt.getAndAdd(res);

http://git-wip-us.apache.org/repos/asf/ignite/blob/77740bf6/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
index 94a83df..c66f335 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/dml/IgniteSqlUpdateFilteredBenchmark.java
@@ -20,6 +20,7 @@ package org.apache.ignite.yardstick.cache.dml;
 import java.util.Map;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.yardstick.cache.IgniteCacheAbstractBenchmark;
@@ -39,7 +40,7 @@ public class IgniteSqlUpdateFilteredBenchmark extends IgniteCacheAbstractBenchma
     private AtomicInteger updCnt = new AtomicInteger();
 
     /** */
-    private AtomicInteger updItemsCnt = new AtomicInteger();
+    private AtomicLong updItemsCnt = new AtomicLong();
 
     /** {@inheritDoc} */
     @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
@@ -55,7 +56,7 @@ public class IgniteSqlUpdateFilteredBenchmark extends IgniteCacheAbstractBenchma
 
             double maxSalary = salary + 1000;
 
-            int res = (Integer) cache().query(new SqlFieldsQuery("update Person set salary
= (salary - ?1 + ?2) / 2 " +
+            Long res = (Long)cache().query(new SqlFieldsQuery("update Person set salary =
(salary - ?1 + ?2) / 2 " +
                 "where salary >= ?1 and salary <= ?2").setArgs(salary, maxSalary)).getAll().get(0).get(0);
 
             updItemsCnt.getAndAdd(res);


Mime
View raw message