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-5075-pds
Date Wed, 31 May 2017 10:01:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075-pds f0656bb43 -> ab9c014ed


ignite-5075-pds


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

Branch: refs/heads/ignite-5075-pds
Commit: ab9c014edf64b9bdf7ecded3678c677e104ceceb
Parents: f0656bb
Author: sboikov <sboikov@gridgain.com>
Authored: Wed May 31 13:01:46 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed May 31 13:01:46 2017 +0300

----------------------------------------------------------------------
 modules/yardstick/pom.xml                          |  6 ++++++
 .../ignite/yardstick/IgniteBenchmarkArguments.java | 12 ++++++++++++
 .../org/apache/ignite/yardstick/IgniteNode.java    | 17 ++++++++++++-----
 3 files changed, 30 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ab9c014e/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index f496e02..6e8bf9b 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -62,6 +62,12 @@
 
         <dependency>
             <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-pds</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-log4j</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/ab9c014e/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 34d2de4..882d220 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
@@ -20,6 +20,7 @@ package org.apache.ignite.yardstick;
 import com.beust.jcommander.Parameter;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.PersistentStoreConfiguration;
 import org.apache.ignite.internal.util.tostring.GridToStringBuilder;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.transactions.TransactionConcurrency;
@@ -194,6 +195,17 @@ public class IgniteBenchmarkArguments {
     @Parameter(names = {"-cig", "--cachesInGrp"}, description = "Number of caches to create
in configured group")
     private int cachesInGrp = 1;
 
+    /** */
+    @Parameter(names = {"-pds", "--persistentStore"}, description = "Persistent store flag")
+    private boolean persistentStoreEnabled;
+
+    /**
+     * @return {@code True} if need set {@link PersistentStoreConfiguration}.
+     */
+    public boolean persistentStoreEnabled() {
+        return persistentStoreEnabled;
+    }
+
     /**
      * @return List of enabled load test operations.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/ab9c014e/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 1f947de..38c2879 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
@@ -30,6 +30,7 @@ import org.apache.ignite.configuration.ConnectorConfiguration;
 import org.apache.ignite.configuration.MemoryConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
+import org.apache.ignite.configuration.PersistentStoreConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -155,15 +156,21 @@ public class IgniteNode implements BenchmarkServer {
         c.setCommunicationSpi(commSpi);
 
         if (args.getPageSize() != MemoryConfiguration.DFLT_PAGE_SIZE) {
-            MemoryConfiguration dbCfg = c.getMemoryConfiguration();
+            MemoryConfiguration memCfg = c.getMemoryConfiguration();
 
-            if (dbCfg == null) {
-                dbCfg = new MemoryConfiguration();
+            if (memCfg == null) {
+                memCfg = new MemoryConfiguration();
 
-                c.setMemoryConfiguration(dbCfg);
+                c.setMemoryConfiguration(memCfg);
             }
 
-            dbCfg.setPageSize(args.getPageSize());
+            memCfg.setPageSize(args.getPageSize());
+        }
+
+        if (args.persistentStoreEnabled()) {
+            PersistentStoreConfiguration pcCfg = new PersistentStoreConfiguration();
+
+            c.setPersistentStoreConfiguration(pcCfg);
         }
 
         ignite = IgniteSpring.start(c, appCtx);


Mime
View raw message