You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/15 07:13:05 UTC
[3/7] ignite git commit: fixed
https://issues.apache.org/jira/browse/IGNITE-2155
fixed https://issues.apache.org/jira/browse/IGNITE-2155
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6703375a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6703375a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6703375a
Branch: refs/heads/ignite-1537
Commit: 6703375a5e6ad00bed74b7b7b513483bec636f37
Parents: 39b2c2f
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Dec 14 17:31:41 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Dec 14 17:31:41 2015 +0300
----------------------------------------------------------------------
.../datagrid/starschema/CacheStarSchemaExample.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6703375a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
index 12fee26..de58fb8 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
@@ -60,7 +60,7 @@ public class CacheStarSchemaExample {
private static final String REPLICATED_CACHE_NAME = CacheStarSchemaExample.class.getSimpleName() + "Replicated";
/** ID generator. */
- private static int idGen = (int)System.currentTimeMillis();
+ private static int idGen;
/** DimStore data. */
private static Map<Integer, DimStore> dataStore = new HashMap<>();
@@ -75,10 +75,13 @@ public class CacheStarSchemaExample {
*/
public static void main(String[] args) {
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
-
System.out.println();
System.out.println(">>> Cache star schema example started.");
+ // Destroy caches to clean up the data if any left from previous runs.
+ ignite.destroyCache(PARTITIONED_CACHE_NAME);
+ ignite.destroyCache(REPLICATED_CACHE_NAME);
+
CacheConfiguration<Integer, FactPurchase> factCacheCfg = new CacheConfiguration<>(PARTITIONED_CACHE_NAME);
factCacheCfg.setCacheMode(CacheMode.PARTITIONED);
@@ -242,4 +245,4 @@ public class CacheStarSchemaExample {
throw new ConcurrentModificationException();
}
-}
\ No newline at end of file
+}