ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [02/43] incubator-ignite git commit: #ignite-571: Remove CacheDistributionMode from benchmark.
Date Mon, 06 Apr 2015 10:45:11 GMT
#ignite-571: Remove CacheDistributionMode from benchmark.


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

Branch: refs/heads/gg-10036
Commit: 3ec22790b18ae4eaa098abeacaf98487b16b0ff8
Parents: 9d85664
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Apr 2 19:36:19 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Apr 2 19:36:19 2015 +0300

----------------------------------------------------------------------
 modules/yardstick/README.md                              |  2 +-
 .../apache/ignite/yardstick/IgniteAbstractBenchmark.java |  5 ++---
 .../ignite/yardstick/IgniteBenchmarkArguments.java       | 11 +++++------
 .../java/org/apache/ignite/yardstick/IgniteNode.java     |  8 +++-----
 4 files changed, 11 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ec22790/modules/yardstick/README.md
----------------------------------------------------------------------
diff --git a/modules/yardstick/README.md b/modules/yardstick/README.md
index 3c89ebe..9821708 100644
--- a/modules/yardstick/README.md
+++ b/modules/yardstick/README.md
@@ -56,7 +56,7 @@ The following Ignite benchmark properties can be defined in the benchmark
config
 * `-b <num>` or `--backups <num>` - Number of backups for every key
 * `-cfg <path>` or `--Config <path>` - Path to Ignite configuration file
 * `-sm <mode>` or `-syncMode <mode>` - Synchronization mode (defined in `CacheWriteSynchronizationMode`)
-* `-dm <mode>` or `--distroMode <mode>` - Distribution mode (defined in `CacheDistributionMode`)
+* `-cl` or `--client <mode>` - Client flag
 * `-wom <mode>` or `--writeOrderMode <mode>` - Write order mode for ATOMIC caches
(defined in `CacheAtomicWriteOrderMode`)
 * `-txc <value>` or `--txConcurrency <value>` - Cache transaction concurrency
control, either `OPTIMISTIC` or `PESSIMISTIC` (defined in `CacheTxConcurrency`)
 * `-txi <value>` or `--txIsolation <value>` - Cache transaction isolation (defined
in `CacheTxIsolation`)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ec22790/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java
index 8ac420d..1e69582 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteAbstractBenchmark.java
@@ -24,7 +24,6 @@ import org.yardstickframework.*;
 
 import java.util.concurrent.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheDistributionMode.*;
 import static org.apache.ignite.events.EventType.*;
 import static org.yardstickframework.BenchmarkUtils.*;
 
@@ -45,13 +44,13 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter
{
         jcommander(cfg.commandLineArguments(), args, "<ignite-driver>");
 
         if (Ignition.state() != IgniteState.STARTED) {
-            node = new IgniteNode(args.distributionMode() == CLIENT_ONLY);
+            node = new IgniteNode(args.isClientOnly());
 
             node.start(cfg);
         }
         else
             // Support for mixed benchmarks mode.
-            node = new IgniteNode(args.distributionMode() == CLIENT_ONLY, Ignition.ignite());
+            node = new IgniteNode(args.isClientOnly(), Ignition.ignite());
 
         waitForNodes();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ec22790/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index f662720..c2901b2 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -19,7 +19,6 @@ package org.apache.ignite.yardstick;
 
 import com.beust.jcommander.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.transactions.*;
 
@@ -44,8 +43,8 @@ public class IgniteBenchmarkArguments {
     private CacheWriteSynchronizationMode syncMode = CacheWriteSynchronizationMode.PRIMARY_SYNC;
 
     /** */
-    @Parameter(names = {"-dm", "--distroMode"}, description = "Distribution mode")
-    private CacheDistributionMode distroMode = CacheDistributionMode.PARTITIONED_ONLY;
+    @Parameter(names = {"-cl", "--client"}, description = "Client flag")
+    private boolean clientOnly = false;
 
     /** */
     @Parameter(names = {"-wom", "--writeOrderMode"}, description = "Write ordering mode")
@@ -126,8 +125,8 @@ public class IgniteBenchmarkArguments {
     /**
      * @return Distribution.
      */
-    public CacheDistributionMode distributionMode() {
-        return distroMode;
+    public boolean isClientOnly() {
+        return clientOnly;
     }
 
     /**
@@ -225,7 +224,7 @@ public class IgniteBenchmarkArguments {
      * @return Description.
      */
     public String description() {
-        return "-nn=" + nodes + "-b=" + backups + "-sm=" + syncMode + "-dm=" + distroMode
+
+        return "-nn=" + nodes + "-b=" + backups + "-sm=" + syncMode + "-cl=" + clientOnly
+
             (orderMode == null ? "" : "-wom=" + orderMode) + "-txc=" + txConcurrency;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ec22790/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index 5984dc2..ed9d768 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -20,7 +20,6 @@ package org.apache.ignite.yardstick;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.spi.communication.tcp.*;
 import org.springframework.beans.*;
@@ -32,7 +31,6 @@ import org.yardstickframework.*;
 import java.net.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMemoryMode.*;
 
 /**
@@ -74,10 +72,10 @@ public class IgniteNode implements BenchmarkServer {
         for (CacheConfiguration cc : c.getCacheConfiguration()) {
             // IgniteNode can not run in CLIENT_ONLY mode,
             // except the case when it's used inside IgniteAbstractBenchmark.
-            CacheDistributionMode distroMode = args.distributionMode() == CLIENT_ONLY &&
!clientMode ?
-                PARTITIONED_ONLY : args.distributionMode();
+            boolean cl = args.isClientOnly() && !clientMode ?
+                false : args.isClientOnly();
 
-            if (distroMode == CLIENT_ONLY)
+            if (cl)
                 c.setClientMode(true);
 
             cc.setWriteSynchronizationMode(args.syncMode());


Mime
View raw message