ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: #ignite-571: Add near cache flag to benchmark.
Date Fri, 03 Apr 2015 10:09:57 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-571 e799b7813 -> eaf7aaecd


#ignite-571: Add near cache flag to 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/eaf7aaec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/eaf7aaec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/eaf7aaec

Branch: refs/heads/ignite-571
Commit: eaf7aaecdf5e92720962a005abf7acc5baf8f013
Parents: e799b78
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Apr 3 13:09:49 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Apr 3 13:09:49 2015 +0300

----------------------------------------------------------------------
 modules/yardstick/README.md                            |  3 ++-
 .../ignite/yardstick/IgniteAbstractBenchmark.java      |  4 ++--
 .../ignite/yardstick/IgniteBenchmarkArguments.java     | 13 ++++++++++++-
 .../java/org/apache/ignite/yardstick/IgniteNode.java   |  5 ++++-
 4 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eaf7aaec/modules/yardstick/README.md
----------------------------------------------------------------------
diff --git a/modules/yardstick/README.md b/modules/yardstick/README.md
index 9821708..36f4314 100644
--- a/modules/yardstick/README.md
+++ b/modules/yardstick/README.md
@@ -56,7 +56,8 @@ 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`)
-* `-cl` or `--client <mode>` - Client flag
+* `-cl` or `--client` - Client flag
+* `-nc` or `--nearCache` - Near cache 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/eaf7aaec/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 1e69582..b848ad1 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
@@ -44,13 +44,13 @@ public abstract class IgniteAbstractBenchmark extends BenchmarkDriverAdapter
{
         jcommander(cfg.commandLineArguments(), args, "<ignite-driver>");
 
         if (Ignition.state() != IgniteState.STARTED) {
-            node = new IgniteNode(args.isClientOnly());
+            node = new IgniteNode(args.isClientOnly() && !args.isNearCache());
 
             node.start(cfg);
         }
         else
             // Support for mixed benchmarks mode.
-            node = new IgniteNode(args.isClientOnly(), Ignition.ignite());
+            node = new IgniteNode(args.isClientOnly() && !args.isNearCache(), Ignition.ignite());
 
         waitForNodes();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eaf7aaec/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 c2901b2..b21bed3 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
@@ -47,6 +47,10 @@ public class IgniteBenchmarkArguments {
     private boolean clientOnly = false;
 
     /** */
+    @Parameter(names = {"-nc", "--nearCache"}, description = "Near cache flag")
+    private boolean nearCacheFlag = false;
+
+    /** */
     @Parameter(names = {"-wom", "--writeOrderMode"}, description = "Write ordering mode")
     private CacheAtomicWriteOrderMode orderMode;
 
@@ -130,6 +134,13 @@ public class IgniteBenchmarkArguments {
     }
 
     /**
+     * @return Near cache flag.
+     */
+    public boolean isNearCache() {
+        return nearCacheFlag;
+    }
+
+    /**
      * @return Synchronization.
      */
     public CacheWriteSynchronizationMode syncMode() {
@@ -224,7 +235,7 @@ public class IgniteBenchmarkArguments {
      * @return Description.
      */
     public String description() {
-        return "-nn=" + nodes + "-b=" + backups + "-sm=" + syncMode + "-cl=" + clientOnly
+
+        return "-nn=" + nodes + "-b=" + backups + "-sm=" + syncMode + "-cl=" + clientOnly
+ "-nc=" + nearCacheFlag +
             (orderMode == null ? "" : "-wom=" + orderMode) + "-txc=" + txConcurrency;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eaf7aaec/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 ed9d768..ad6cffa 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
@@ -72,12 +72,15 @@ 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.
-            boolean cl = args.isClientOnly() && !clientMode ?
+            boolean cl = args.isClientOnly() && !args.isNearCache() && !clientMode
?
                 false : args.isClientOnly();
 
             if (cl)
                 c.setClientMode(true);
 
+            if (args.isNearCache())
+                c.setNearCacheConfiguration(new NearCacheConfiguration());
+
             cc.setWriteSynchronizationMode(args.syncMode());
 
             if (args.orderMode() != null)


Mime
View raw message