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/01/13 04:58:41 UTC
[1/7] incubator-ignite git commit: GG-9673 Need to investigate MBeans
registration in Weblogic cluster environment Added jvmId property to mbean
name.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-32 1b2c8f56b -> 81d251141
GG-9673 Need to investigate MBeans registration in Weblogic cluster environment Added jvmId property to mbean name.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a7b426cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a7b426cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a7b426cf
Branch: refs/heads/ignite-32
Commit: a7b426cffe243ad6270a06bc251e283acf3a5b43
Parents: 5fd0d7c
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Jan 12 12:48:55 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Jan 12 12:48:55 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/IgniteSystemProperties.java | 13 +++++++++++++
.../main/java/org/gridgain/grid/util/GridUtils.java | 16 ++++++++++++++++
2 files changed, 29 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a7b426cf/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index c403fd7..b4d9d81 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -12,6 +12,7 @@ package org.apache.ignite;
import org.jetbrains.annotations.*;
import javax.net.ssl.*;
+import java.lang.management.*;
/**
* Contains constants for all system properties and environmental variables in GridGain. These
@@ -448,6 +449,18 @@ public final class IgniteSystemProperties {
public static final String GG_WORK_DIR = "GRIDGAIN_WORK_DIR";
/**
+ * If this property is set to {@code true} then GridGain will append
+ * hash code of {@link Ignite} class as hex string and append
+ * JVM name returned by {@link RuntimeMXBean#getName()}.
+ * <p>
+ * This may be helpful when running GridGain in some application server
+ * clusters or similar environments to avoid MBean name collisions.
+ * <p>
+ * Default is {@code false}.
+ */
+ public static final String GG_MBEAN_APPEND_JVM_ID = "GRIDGAIN_MBEAN_APPEND_JVM_ID";
+
+ /**
* Enforces singleton.
*/
private IgniteSystemProperties() {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a7b426cf/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
index 37c2109..62d27d3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
+++ b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java
@@ -3867,6 +3867,8 @@ public abstract class GridUtils {
throws MalformedObjectNameException {
SB sb = new SB(JMX_DOMAIN + ':');
+ appendJvmId(sb);
+
if (gridName != null && !gridName.isEmpty())
sb.a("grid=").a(gridName).a(',');
@@ -3879,6 +3881,18 @@ public abstract class GridUtils {
}
/**
+ * @param sb Sb.
+ */
+ private static void appendJvmId(SB sb) {
+ if (getBoolean(GG_MBEAN_APPEND_JVM_ID)) {
+ String gridId = Integer.toHexString(Ignite.class.getClassLoader().hashCode()) + "_"
+ + ManagementFactory.getRuntimeMXBean().getName();
+
+ sb.a("jvmId=").a(gridId).a(',');
+ }
+ }
+
+ /**
* Mask component name to make sure that it is not {@code null}.
*
* @param cacheName Component name to mask, possibly {@code null}.
@@ -3902,6 +3916,8 @@ public abstract class GridUtils {
throws MalformedObjectNameException {
SB sb = new SB(JMX_DOMAIN + ':');
+ appendJvmId(sb);
+
if (gridName != null && !gridName.isEmpty())
sb.a("grid=").a(gridName).a(',');
[5/7] incubator-ignite git commit: Update parent pom.xml: set parent
org.papache.apache:16, add mailingLists, issueManagement, changed git url.
Posted by sb...@apache.org.
Update parent pom.xml: set parent org.papache.apache:16, add mailingLists, issueManagement, changed git url.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9ab3fcb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9ab3fcb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9ab3fcb0
Branch: refs/heads/ignite-32
Commit: 9ab3fcb0900091a0d7f838df033b145dc11583b6
Parents: d45bdd7
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Jan 12 18:12:16 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Jan 12 18:12:52 2015 +0300
----------------------------------------------------------------------
pom.xml | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9ab3fcb0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e35788f..ce0d4c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,6 +18,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>16</version>
+ </parent>
+
<properties>
<ignite.version>7.0.0</ignite.version>
<gridgain.edition>fabric</gridgain.edition>
@@ -34,7 +40,7 @@
<version>${ignite.version}</version>
<packaging>pom</packaging>
- <url>http://www.gridgain.com</url>
+ <url>http://ignite.incubator.apache.org</url>
<description>Java-based middleware for in-memory processing of big data in a distributed environment.</description>
@@ -45,9 +51,24 @@
</license>
</licenses>
+ <mailingLists>
+ <mailingList>
+ <name>Ignite Dev List</name>
+ <subscribe>dev-subscribe@ignite.incubator.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe@ignite.incubator.apache.org</unsubscribe>
+ <post>dev@ignite.incubator.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/incubator-ignite-dev</archive>
+ </mailingList>
+ </mailingLists>
+
+ <issueManagement>
+ <system>jira</system>
+ <url>http://issues.apache.org/jira/browse/IGNITE</url>
+ </issueManagement>
+
<scm>
- <url>https://github.com/gridgain/gridgain</url>
- <connection>scm:git:git://github.com/gridgain/gridgain.git</connection>
+ <url>https://git-wip-us.apache.org/repos/asf/incubator-ignite</url>
+ <connection>scm:git:git://git-wip-us.apache.org/repos/asf/incubator-ignite</connection>
</scm>
<developers>
[3/7] incubator-ignite git commit: ignite master: fix for scala
examples
Posted by sb...@apache.org.
ignite master: fix for scala examples
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/78d99206
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/78d99206
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/78d99206
Branch: refs/heads/ignite-32
Commit: 78d99206ae89c0b4f3ee9696d4209c478e73655e
Parents: 5fd0d7c
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jan 12 17:01:03 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jan 12 17:01:03 2015 +0300
----------------------------------------------------------------------
.../examples/ScalarCacheAffinityExample1.scala | 3 +++
.../examples/ScalarCacheAffinityExample2.scala | 3 +++
.../ScalarCacheAffinitySimpleExample.scala | 10 +++++++--
.../scalar/examples/ScalarCacheExample.scala | 12 ++++++++---
.../ScalarCachePopularNumbersExample.scala | 3 +++
.../examples/ScalarCacheQueryExample.scala | 3 +++
.../examples/ScalarSnowflakeSchemaExample.scala | 22 ++++++++++++++------
7 files changed, 45 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample1.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample1.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample1.scala
index e7aa494..118c33c 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample1.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample1.scala
@@ -45,6 +45,9 @@ object ScalarCacheAffinityExample1 {
*/
def main(args: Array[String]) {
scalar(CONFIG) {
+ // Clean up caches on all nodes before run.
+ cache$(NAME).get.globalClearAll(0)
+
var keys = Seq.empty[String]
('A' to 'Z').foreach(keys :+= _.toString)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample2.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample2.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample2.scala
index 2790c8c..0fd7f73 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample2.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinityExample2.scala
@@ -41,6 +41,9 @@ object ScalarCacheAffinityExample2 {
*/
def main(args: Array[String]) {
scalar(CONFIG) {
+ // Clean up caches on all nodes before run.
+ cache$(NAME).get.globalClearAll(0)
+
var keys = Seq.empty[String]
('A' to 'Z').foreach(keys :+= _.toString)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinitySimpleExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinitySimpleExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinitySimpleExample.scala
index adc80a2..33e3afa 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinitySimpleExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheAffinitySimpleExample.scala
@@ -33,6 +33,9 @@ object ScalarCacheAffinitySimpleExample extends App {
/** Number of keys. */
private val KEY_CNT = 20
+ /** Name of cache specified in spring configuration. */
+ private val NAME = "partitioned"
+
/** Type alias. */
type Cache = GridCache[Int, String]
@@ -41,7 +44,10 @@ object ScalarCacheAffinitySimpleExample extends App {
* since there is no distribution, values may come back as `nulls`.
*/
scalar("examples/config/example-cache.xml") {
- val c = grid$.cache[Int, String]("partitioned")
+ // Clean up caches on all nodes before run.
+ cache$(NAME).get.globalClearAll(0)
+
+ val c = grid$.cache[Int, String](NAME)
populate(c)
visit(c)
@@ -55,7 +61,7 @@ object ScalarCacheAffinitySimpleExample extends App {
*/
private def visit(c: Cache) {
(0 until KEY_CNT).foreach(i =>
- grid$.compute().affinityRun("partitioned", i,
+ grid$.compute().affinityRun(NAME, i,
() => println("Co-located [key= " + i + ", value=" + c.peek(i) + ']'))
)
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheExample.scala
index d61adc5..d33ff03 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheExample.scala
@@ -27,7 +27,13 @@ import collection.JavaConversions._
* be started with or without cache.
*/
object ScalarCacheExample extends App {
+ /** Name of cache specified in spring configuration. */
+ private val NAME = "partitioned"
+
scalar("examples/config/example-cache.xml") {
+ // Clean up caches on all nodes before run.
+ cache$(NAME).get.globalClearAll(0)
+
registerListener()
basicOperations()
@@ -39,7 +45,7 @@ object ScalarCacheExample extends App {
*/
def basicOperations() {
// Create cache predicate-based projection (all values > 30).
- val c = cache$("partitioned").get.viewByType(classOf[String], classOf[Int]).
+ val c = cache$(NAME).get.viewByType(classOf[String], classOf[Int]).
viewByKv((k: String, v: Int) => v < 30)
// Add few values.
@@ -87,8 +93,8 @@ object ScalarCacheExample extends App {
*/
def twoViewsOneCache() {
// Create two typed views on the same cache.
- val view1 = cache$("partitioned").get.viewByType(classOf[String], classOf[Int])
- val view2 = cache$("partitioned").get.viewByType(classOf[Int], classOf[String])
+ val view1 = cache$(NAME).get.viewByType(classOf[String], classOf[Int])
+ val view2 = cache$(NAME).get.viewByType(classOf[Int], classOf[String])
view1 += ("key1" -> 1)
view1 += ("key2" -> 2)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCachePopularNumbersExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCachePopularNumbersExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCachePopularNumbersExample.scala
index 8546ab8..22a18e7 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCachePopularNumbersExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCachePopularNumbersExample.scala
@@ -50,6 +50,9 @@ object ScalarCachePopularNumbersExample extends App {
private final val CNT = 100000
scalar("examples/config/example-cache.xml") {
+ // Clean up caches on all nodes before run.
+ cache$(CACHE_NAME).get.globalClearAll(0)
+
println()
println(">>> Cache popular numbers example started.")
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheQueryExample.scala
index f29418a..c56c619 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarCacheQueryExample.scala
@@ -105,6 +105,9 @@ object ScalarCacheQueryExample {
* Populates cache with test data.
*/
private def initialize() {
+ // Clean up caches on all nodes before run.
+ cache$(CACHE_NAME).get.globalClearAll(0)
+
// Organization cache projection.
val orgCache = mkCache[UUID, Organization]
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78d99206/examples/src/main/scala/org/gridgain/scalar/examples/ScalarSnowflakeSchemaExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarSnowflakeSchemaExample.scala b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarSnowflakeSchemaExample.scala
index 1ca5b78..f4216e1 100644
--- a/examples/src/main/scala/org/gridgain/scalar/examples/ScalarSnowflakeSchemaExample.scala
+++ b/examples/src/main/scala/org/gridgain/scalar/examples/ScalarSnowflakeSchemaExample.scala
@@ -29,6 +29,12 @@ import org.jdk8.backport.ThreadLocalRandom8
* cache: `'ggstart.sh examples/config/example-cache.xml'`.
*/
object ScalarSnowflakeSchemaExample {
+ /** Name of replicated cache specified in spring configuration. */
+ private val REPL_CACHE_NAME = "replicated"
+
+ /** Name of partitioned cache specified in spring configuration. */
+ private val PART_CACHE_NAME = "partitioned"
+
/** ID generator. */
private[this] val idGen = Stream.from(0).iterator
@@ -37,6 +43,10 @@ object ScalarSnowflakeSchemaExample {
*/
def main(args: Array[String]) {
scalar("examples/config/example-cache.xml") {
+ // Clean up caches on all nodes before run.
+ cache$(REPL_CACHE_NAME).get.globalClearAll(0)
+ cache$(PART_CACHE_NAME).get.globalClearAll(0)
+
populateDimensions()
populateFacts()
@@ -50,7 +60,7 @@ object ScalarSnowflakeSchemaExample {
* `DimStore` and `DimProduct` instances.
*/
def populateDimensions() {
- val dimCache = grid$.cache[Int, Object]("replicated")
+ val dimCache = grid$.cache[Int, Object](REPL_CACHE_NAME)
val store1 = new DimStore(idGen.next(), "Store1", "12345", "321 Chilly Dr, NY")
val store2 = new DimStore(idGen.next(), "Store2", "54321", "123 Windy Dr, San Francisco")
@@ -70,8 +80,8 @@ object ScalarSnowflakeSchemaExample {
* Populate cache with `facts`, which in our case are `FactPurchase` objects.
*/
def populateFacts() {
- val dimCache = grid$.cache[Int, Object]("replicated")
- val factCache = grid$.cache[Int, FactPurchase]("partitioned")
+ val dimCache = grid$.cache[Int, Object](REPL_CACHE_NAME)
+ val factCache = grid$.cache[Int, FactPurchase](PART_CACHE_NAME)
val stores: GridCacheProjection[Int, DimStore] = dimCache.viewByType(classOf[Int], classOf[DimStore])
val prods: GridCacheProjection[Int, DimProduct] = dimCache.viewByType(classOf[Int], classOf[DimProduct])
@@ -91,7 +101,7 @@ object ScalarSnowflakeSchemaExample {
* `FactPurchase` objects stored in `partitioned` cache.
*/
def queryStorePurchases() {
- val factCache = grid$.cache[Int, FactPurchase]("partitioned")
+ val factCache = grid$.cache[Int, FactPurchase](PART_CACHE_NAME)
val storePurchases = factCache.sql(
"from \"replicated\".DimStore, \"partitioned\".FactPurchase " +
@@ -107,8 +117,8 @@ object ScalarSnowflakeSchemaExample {
* stored in `partitioned` cache.
*/
private def queryProductPurchases() {
- val dimCache = grid$.cache[Int, Object]("replicated")
- val factCache = grid$.cache[Int, FactPurchase]("partitioned")
+ val dimCache = grid$.cache[Int, Object](REPL_CACHE_NAME)
+ val factCache = grid$.cache[Int, FactPurchase](PART_CACHE_NAME)
val prods: GridCacheProjection[Int, DimProduct] = dimCache.viewByType(classOf[Int], classOf[DimProduct])
[6/7] incubator-ignite git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-32
Posted by sb...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-32
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/aa658126
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/aa658126
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/aa658126
Branch: refs/heads/ignite-32
Commit: aa658126f9c9b542b5a69763c30032aec180cf88
Parents: 1b2c8f5 9ab3fcb
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jan 13 10:39:36 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jan 13 10:39:36 2015 +0700
----------------------------------------------------------------------
.../examples/ScalarCacheAffinityExample1.scala | 3 +++
.../examples/ScalarCacheAffinityExample2.scala | 3 +++
.../ScalarCacheAffinitySimpleExample.scala | 10 ++++++--
.../scalar/examples/ScalarCacheExample.scala | 12 ++++++---
.../ScalarCachePopularNumbersExample.scala | 3 +++
.../examples/ScalarCacheQueryExample.scala | 3 +++
.../examples/ScalarSnowflakeSchemaExample.scala | 22 +++++++++++-----
.../apache/ignite/IgniteSystemProperties.java | 13 ++++++++++
.../communication/tcp/TcpCommunicationSpi.java | 8 +++---
.../java/org/gridgain/grid/util/GridUtils.java | 16 ++++++++++++
pom.xml | 27 +++++++++++++++++---
11 files changed, 103 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa658126/pom.xml
----------------------------------------------------------------------
[4/7] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d45bdd74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d45bdd74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d45bdd74
Branch: refs/heads/ignite-32
Commit: d45bdd7406dbddffa507a3560406e848a73c0a86
Parents: 78d9920 7f190ca
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jan 12 17:02:11 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jan 12 17:02:11 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/IgniteSystemProperties.java | 13 +++++++++++++
.../spi/communication/tcp/TcpCommunicationSpi.java | 8 +++++---
.../main/java/org/gridgain/grid/util/GridUtils.java | 16 ++++++++++++++++
3 files changed, 34 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[7/7] incubator-ignite git commit: # IGNITE-32 WIP: Store
implementation.
Posted by sb...@apache.org.
# IGNITE-32 WIP: Store implementation.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/81d25114
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/81d25114
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/81d25114
Branch: refs/heads/ignite-32
Commit: 81d2511414a3da7d61f6cce26a2f3ff59efe31ec
Parents: aa65812
Author: AKuznetsov <ak...@gridgain.com>
Authored: Tue Jan 13 10:58:48 2015 +0700
Committer: AKuznetsov <ak...@gridgain.com>
Committed: Tue Jan 13 10:58:48 2015 +0700
----------------------------------------------------------------------
.../org/gridgain/grid/cache/store/auto/AutoCacheStore.java | 9 +++++----
.../org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java | 2 ++
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81d25114/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/AutoCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/AutoCacheStore.java b/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/AutoCacheStore.java
index aeff437..6dfcc3d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/AutoCacheStore.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/AutoCacheStore.java
@@ -504,6 +504,7 @@ public abstract class AutoCacheStore<K, V> implements GridCacheStore<K, V> {
/**
* Construct load cache query.
+ *
* @param tblName Database table name.
* @param uniqCols Database unique columns.
* @return Load cache query.
@@ -865,12 +866,12 @@ public abstract class AutoCacheStore<K, V> implements GridCacheStore<K, V> {
for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
Object typeKey = typeKey(entry.getKey());
- Collection<Map.Entry<? extends K, ? extends V>> s = keyByType.get(typeKey);
+ Collection<Map.Entry<? extends K, ? extends V>> batch = keyByType.get(typeKey);
- if (s == null)
- keyByType.put(typeKey, s = new ArrayList<>());
+ if (batch == null)
+ keyByType.put(typeKey, batch = new ArrayList<>());
- s.add(entry);
+ batch.add(entry);
}
for (Map.Entry<Object, Collection<Map.Entry<? extends K, ? extends V>>> m : keyByType.entrySet())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/81d25114/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java b/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java
index b5b4e06..6606c707 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/store/auto/PojoJdbcMapper.java
@@ -43,6 +43,8 @@ public class PojoJdbcMapper implements JdbcMapper<Object> {
*/
protected PojoJdbcMapper(String clsName, Collection<GridCacheQueryTypeDescriptor> descs,
@Nullable Collection<String> paramNames) throws IgniteCheckedException {
+ assert descs != null && !descs.isEmpty();
+
try {
cls = Class.forName(clsName);
[2/7] incubator-ignite git commit: # master Fixed recovery descriptor
creation
Posted by sb...@apache.org.
# master Fixed recovery descriptor creation
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7f190ca9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7f190ca9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7f190ca9
Branch: refs/heads/ignite-32
Commit: 7f190ca9cd731f3f93c92fbbd16a4c652c7bb767
Parents: a7b426c
Author: sboikov <sb...@gridgain.com>
Authored: Mon Jan 12 15:04:14 2015 +0400
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Jan 12 15:04:14 2015 +0400
----------------------------------------------------------------------
.../ignite/spi/communication/tcp/TcpCommunicationSpi.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f190ca9/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index c80617e..3736d08 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -519,7 +519,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
GridCommunicationClient oldClient = clients.putIfAbsent(node.id(), client);
- assert oldClient == null;
+ assert oldClient == null : "Client already created [node=" + node + ", client=" + client +
+ ", oldClient=" + oldClient + ", recoveryDesc=" + recovery + ']';
}
return client;
@@ -1830,7 +1831,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
if (client0 != null) {
GridCommunicationClient old = clients.put(nodeId, client0);
- assert old == null;
+ assert old == null : "Client already created " +
+ "[node=" + node + ", client=" + client0 + ", oldClient=" + old + ']';
}
else
U.sleep(200);
@@ -2359,7 +2361,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
int queueLimit = unackedMsgsBufSize != 0 ? unackedMsgsBufSize : (maxSize * 5);
GridNioRecoveryDescriptor old =
- recoveryDescs.put(id, recovery = new GridNioRecoveryDescriptor(queueLimit, node, log));
+ recoveryDescs.putIfAbsent(id, recovery = new GridNioRecoveryDescriptor(queueLimit, node, log));
if (old != null)
recovery = old;