You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/08/06 13:02:51 UTC
[01/32] incubator-ignite git commit: IGNITE-1157 Fix.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-gg-9615 9ed0b61d8 -> ac3e73bf6
IGNITE-1157 Fix.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/45aa5985
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/45aa5985
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/45aa5985
Branch: refs/heads/ignite-gg-9615
Commit: 45aa5985bfe0ca3b9a537f9b7ef2136a64d97d28
Parents: 32f84c1
Author: sevdokimov <se...@gridgain.com>
Authored: Fri Jul 24 18:44:46 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Fri Jul 24 18:44:46 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridLogThrottle.java | 53 +++++++++++++-------
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 ++++++
4 files changed, 57 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45aa5985/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
index 89b02b4..f37cfea 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
@@ -18,9 +18,9 @@
package org.apache.ignite.internal.util;
import org.apache.ignite.*;
+import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -42,7 +42,7 @@ public class GridLogThrottle {
private static int throttleTimeout = DFLT_THROTTLE_TIMEOUT;
/** Errors. */
- private static final ConcurrentMap<IgniteBiTuple<Class<? extends Throwable>, String>, Long> errors =
+ private static final ConcurrentMap<GridTuple3<Class<? extends Throwable>, String, Boolean>, Long> errors =
new ConcurrentHashMap8<>();
/**
@@ -73,7 +73,7 @@ public class GridLogThrottle {
public static void error(@Nullable IgniteLogger log, @Nullable Throwable e, String msg) {
assert !F.isEmpty(msg);
- log(log, e, msg, null, LogLevel.ERROR);
+ log(log, e, msg, null, LogLevel.ERROR, false);
}
/**
@@ -86,7 +86,20 @@ public class GridLogThrottle {
public static void warn(@Nullable IgniteLogger log, @Nullable Throwable e, String msg) {
assert !F.isEmpty(msg);
- log(log, e, msg, null, LogLevel.WARN);
+ log(log, e, msg, null, LogLevel.WARN, false);
+ }
+
+ /**
+ * Logs warning if needed.
+ *
+ * @param log Logger.
+ * @param e Error (optional).
+ * @param msg Message.
+ */
+ public static void warn(@Nullable IgniteLogger log, @Nullable Throwable e, String msg, boolean quite) {
+ assert !F.isEmpty(msg);
+
+ log(log, e, msg, null, LogLevel.WARN, quite);
}
/**
@@ -100,7 +113,7 @@ public class GridLogThrottle {
public static void warn(@Nullable IgniteLogger log, @Nullable Throwable e, String longMsg, @Nullable String shortMsg) {
assert !F.isEmpty(longMsg);
- log(log, e, longMsg, shortMsg, LogLevel.WARN);
+ log(log, e, longMsg, shortMsg, LogLevel.WARN, false);
}
/**
@@ -112,7 +125,7 @@ public class GridLogThrottle {
public static void info(@Nullable IgniteLogger log, String msg) {
assert !F.isEmpty(msg);
- log(log, null, msg, null, LogLevel.INFO);
+ log(log, null, msg, null, LogLevel.INFO, false);
}
/**
@@ -133,12 +146,12 @@ public class GridLogThrottle {
*/
@SuppressWarnings({"RedundantTypeArguments"})
private static void log(@Nullable IgniteLogger log, @Nullable Throwable e, String longMsg, @Nullable String shortMsg,
- LogLevel level) {
+ LogLevel level, boolean quiet) {
assert !F.isEmpty(longMsg);
- IgniteBiTuple<Class<? extends Throwable>, String> tup =
- e != null ? F.<Class<? extends Throwable>, String>t(e.getClass(), e.getMessage()) :
- F.<Class<? extends Throwable>, String>t(null, longMsg);
+ GridTuple3<Class<? extends Throwable>, String, Boolean> tup =
+ e != null ? F.<Class<? extends Throwable>, String, Boolean>t(e.getClass(), e.getMessage(), quiet) :
+ F.<Class<? extends Throwable>, String, Boolean>t(null, longMsg, quiet);
while (true) {
Long loggedTs = errors.get(tup);
@@ -147,7 +160,7 @@ public class GridLogThrottle {
if (loggedTs == null || loggedTs < curTs - throttleTimeout) {
if (replace(tup, loggedTs, curTs)) {
- level.doLog(log, longMsg, shortMsg, e);
+ level.doLog(log, longMsg, shortMsg, e, quiet);
break;
}
@@ -164,7 +177,7 @@ public class GridLogThrottle {
* @param newStamp New timestamp.
* @return {@code True} if throttle value was replaced.
*/
- private static boolean replace(IgniteBiTuple<Class<? extends Throwable>, String> t, @Nullable Long oldStamp,
+ private static boolean replace(GridTuple3<Class<? extends Throwable>, String, Boolean> t, @Nullable Long oldStamp,
Long newStamp) {
assert newStamp != null;
@@ -182,10 +195,13 @@ public class GridLogThrottle {
// No-op.
}
+ /**
+ *
+ */
private enum LogLevel {
/** Error level. */
ERROR {
- @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e) {
+ @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet) {
if (e != null)
U.error(log, longMsg, e);
else
@@ -195,14 +211,17 @@ public class GridLogThrottle {
/** Warn level. */
WARN {
- @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e) {
- U.warn(log, longMsg, F.isEmpty(shortMsg) ? longMsg : shortMsg);
+ @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet) {
+ if (quiet)
+ U.quietAndWarn(log, longMsg, F.isEmpty(shortMsg) ? longMsg : shortMsg);
+ else
+ U.warn(log, longMsg, F.isEmpty(shortMsg) ? longMsg : shortMsg);
}
},
/** Info level. */
INFO {
- @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e) {
+ @Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet) {
if (log.isInfoEnabled())
log.info(longMsg);
}
@@ -216,6 +235,6 @@ public class GridLogThrottle {
* @param shortMsg Short message.
* @param e Exception to attach to log.
*/
- public abstract void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e);
+ public abstract void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45aa5985/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index f9c4a4d..a052e58 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -384,7 +384,8 @@ class ClientImpl extends TcpDiscoveryImpl {
if (timeout > 0 && (U.currentTimeMillis() - startTime) > timeout)
return null;
- U.warn(log, "No addresses registered in the IP finder (will retry in 2000ms): " + spi.ipFinder);
+ LT.warn(log, null, "No addresses registered in the IP finder (will retry in 2000ms): "
+ + spi.ipFinder, true);
Thread.sleep(2000);
}
@@ -435,7 +436,7 @@ class ClientImpl extends TcpDiscoveryImpl {
return null;
LT.warn(log, null, "Failed to connect to any address from IP finder (will retry to join topology " +
- "in 2000ms): " + addrs0);
+ "in 2000ms): " + toOrderedList(addrs0), true);
Thread.sleep(2000);
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45aa5985/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index 68552a6..75436fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -830,10 +830,11 @@ class ServerImpl extends TcpDiscoveryImpl {
e.addSuppressed(err);
}
- if (e != null && X.hasCause(e, ConnectException.class))
+ if (e != null && X.hasCause(e, ConnectException.class)) {
LT.warn(log, null, "Failed to connect to any address from IP finder " +
"(make sure IP finder addresses are correct and firewalls are disabled on all host machines): " +
- addrs);
+ toOrderedList(addrs), true);
+ }
if (spi.joinTimeout > 0) {
if (noResStart == 0)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/45aa5985/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
index ace917f..e8ee798 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
@@ -26,6 +26,7 @@ import org.apache.ignite.spi.discovery.*;
import org.apache.ignite.spi.discovery.tcp.internal.*;
import org.jetbrains.annotations.*;
+import java.net.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
@@ -276,4 +277,18 @@ abstract class TcpDiscoveryImpl {
return true;
}
+
+ /**
+ * @param addrs Addresses.
+ */
+ protected static List<String> toOrderedList(Collection<InetSocketAddress> addrs) {
+ List<String> res = new ArrayList<>(addrs.size());
+
+ for (InetSocketAddress addr : addrs)
+ res.add(addr.toString());
+
+ Collections.sort(res);
+
+ return res;
+ }
}
[28/32] incubator-ignite git commit: msg format
Posted by vo...@apache.org.
msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5ce8bc69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5ce8bc69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5ce8bc69
Branch: refs/heads/ignite-gg-9615
Commit: 5ce8bc692cdc5e7662ccd6ac5f6e8f5b2fd493e4
Parents: d7623b4
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 12:52:59 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 12:52:59 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5ce8bc69/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index d5d6ea2..5e81a3e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -418,8 +418,7 @@ class ClientImpl extends TcpDiscoveryImpl {
"Please check IP finder configuration" +
(spi.ipFinder instanceof TcpDiscoveryMulticastIpFinder ?
" and make sure multicast works on your network. " : ". ") +
- "Will retry every 2 secs."
- + spi.ipFinder, true);
+ "Will retry every 2 secs.", true);
Thread.sleep(2000);
}
[25/32] incubator-ignite git commit: typo + msg format
Posted by vo...@apache.org.
typo + msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/023ffe0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/023ffe0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/023ffe0e
Branch: refs/heads/ignite-gg-9615
Commit: 023ffe0eee38663fe78dacd9b63d5f121226008b
Parents: 19310d3
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 17:29:24 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 17:29:24 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/023ffe0e/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index 19f43e6..7ea490a 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -237,7 +237,7 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
}
}
catch (IllegalAccessException | NoSuchFieldException e) {
- error("Faild to get file name. Looks like the implementation of log4j 2 was changed.", e);
+ error("Failed to get file name (was the implementation of log4j2 changed?).", e);
}
}
}
[10/32] incubator-ignite git commit: Merge branch 'ignite-1172' into
ignite-1.3.3
Posted by vo...@apache.org.
Merge branch 'ignite-1172' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/12cbe229
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/12cbe229
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/12cbe229
Branch: refs/heads/ignite-gg-9615
Commit: 12cbe2294c9f19dfa6225c98797c9d9f3ff015b3
Parents: b0dd932 3ace82a
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 14:49:08 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 14:49:08 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheProcessor.java | 10 ++++++++--
.../ignite/internal/processors/cache/GridCacheUtils.java | 1 -
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[07/32] incubator-ignite git commit: IGNITE-1185 Locate configuration
in class path: Add tests. (cherry picked from commit 79f27f4)
Posted by vo...@apache.org.
IGNITE-1185 Locate configuration in class path: Add tests.
(cherry picked from commit 79f27f4)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c66a877a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c66a877a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c66a877a
Branch: refs/heads/ignite-gg-9615
Commit: c66a877ad5cacfca310341e7301d7e2e96d6c6dc
Parents: 754da7a
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 13:46:40 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:26 2015 +0300
----------------------------------------------------------------------
.../src/test/java/config/ignite-test-config.xml | 43 ++++++++++++++++++++
.../ignite/internal/GridFactorySelfTest.java | 9 ++++
2 files changed, 52 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c66a877a/modules/spring/src/test/java/config/ignite-test-config.xml
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/config/ignite-test-config.xml b/modules/spring/src/test/java/config/ignite-test-config.xml
new file mode 100644
index 0000000..145d124
--- /dev/null
+++ b/modules/spring/src/test/java/config/ignite-test-config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+ Ignite configuration with all defaults and enabled p2p deployment and enabled events.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+ <property name="localHost" value="127.0.0.1" />
+
+ <property name="gridName" value="config-in-classpath"/>
+
+ <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+ <property name="discoverySpi">
+ <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+ <property name="ipFinder">
+ <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+ <property name="shared" value="true"/>
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c66a877a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
index ecc7fb7..fb8cbfe 100644
--- a/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
+++ b/modules/spring/src/test/java/org/apache/ignite/internal/GridFactorySelfTest.java
@@ -824,6 +824,15 @@ public class GridFactorySelfTest extends GridCommonAbstractTest {
}
/**
+ * @throws Exception If failed.
+ */
+ public void testConfigInClassPath() throws Exception {
+ try (Ignite ignite = Ignition.start("config/ignite-test-config.xml")) {
+ assert "config-in-classpath".equals(ignite.name());
+ }
+ }
+
+ /**
* Test task.
*/
private static class TestTask extends ComputeTaskSplitAdapter<Void, Void> {
[09/32] incubator-ignite git commit: IGNITE-1172 Fixed review notes.
Posted by vo...@apache.org.
IGNITE-1172 Fixed review notes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3ace82ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ace82ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ace82ac
Branch: refs/heads/ignite-gg-9615
Commit: 3ace82ac5ea85da5cd0883eb4da794f0609a8218
Parents: 4ba8b6f
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 14:22:08 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 14:22:08 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheProcessor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ace82ac/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index a83fd4c..8e2b20e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,8 +497,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getAffinityMapper(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
- if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
- unregisterMbean(cctx.cache().mxBean(), U.maskName(cctx.cache().name()) + "_" + ctx.gridName(), false);
+ if (!CU.isUtilityCache(cfg.getName()) && !CU.isSystemCache(cfg.getName()))
+ unregisterMbean(cctx.cache().mxBean(), cfg.getName(), false);
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1360,7 +1360,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
- registerMbean(cache.mxBean(), U.maskName(cache.name()) + "_" + ctx.gridName(), false);
+ registerMbean(cache.mxBean(), cache.name(), false);
return ret;
}
[08/32] incubator-ignite git commit: IGNITE-1185 Fix javadoc. (cherry
picked from commit 3c19212)
Posted by vo...@apache.org.
IGNITE-1185 Fix javadoc.
(cherry picked from commit 3c19212)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0dd9320
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0dd9320
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0dd9320
Branch: refs/heads/ignite-gg-9615
Commit: b0dd9320f26af01a67f27842bf501049bac43665
Parents: c66a877
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 14:11:58 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:33 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/internal/util/IgniteUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0dd9320/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index ee07743..3366256 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3321,7 +3321,7 @@ public abstract class IgniteUtils {
/**
* @param path Resource path.
- * @return Resource URL inside jar. Or {@code null}.
+ * @return Resource URL inside classpath or {@code null}.
*/
@Nullable private static URL resolveInClasspath(String path) {
ClassLoader clsLdr = Thread.currentThread().getContextClassLoader();
[24/32] incubator-ignite git commit: removed unused file.
Posted by vo...@apache.org.
removed unused file.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19310d34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19310d34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19310d34
Branch: refs/heads/ignite-gg-9615
Commit: 19310d3468ff9ed9307fe30a5a5769829dfe4219
Parents: c391165
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 16:35:44 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 16:35:44 2015 +0300
----------------------------------------------------------------------
.../ignite/logger/log4j2/Log4j2FileAware.java | 35 --------------------
1 file changed, 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19310d34/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
deleted file mode 100644
index c389e69..0000000
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4j2FileAware.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.logger.log4j2;
-
-import org.apache.ignite.lang.IgniteClosure;
-
-/**
- * Porting for the Log4j2, the interface is useless with the new implementation
- * of the module
- *
- * @author Gianfranco Murador
- */
-public interface Log4j2FileAware {
-
- /**
- * Sets closure that later evaluate file path.
- *
- * @param filePathClos Closure that generates actual file path.
- */
- void updateFilePath(IgniteClosure<String, String> filePathClos);
-}
[05/32] incubator-ignite git commit: IGNITE-1172 Fixed tests.
Posted by vo...@apache.org.
IGNITE-1172 Fixed tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4ba8b6f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4ba8b6f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4ba8b6f4
Branch: refs/heads/ignite-gg-9615
Commit: 4ba8b6f4c3b4e90345ebf67ad0750fd4a6cfb662
Parents: 9389c6e
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 13:20:44 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 13:20:44 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheProcessor.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba8b6f4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index fc6054b..a83fd4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,9 +497,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getAffinityMapper(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
- if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cctx.cache().name())
- && !CU.isSystemCache(cctx.cache().name()))
- cleanup(cfg, cctx.cache().name(), false);
+ if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
+ unregisterMbean(cctx.cache().mxBean(), U.maskName(cctx.cache().name()) + "_" + ctx.gridName(), false);
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1360,8 +1359,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheCtx.cache(dht);
}
- if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
- prepare(cfg, cache.mxBean(), false);
+ if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
+ registerMbean(cache.mxBean(), U.maskName(cache.name()) + "_" + ctx.gridName(), false);
return ret;
}
[14/32] incubator-ignite git commit: Added benchmarks for jdbc.
Posted by vo...@apache.org.
Added benchmarks for jdbc.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/52c1dfa3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/52c1dfa3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/52c1dfa3
Branch: refs/heads/ignite-gg-9615
Commit: 52c1dfa32d86183c07c82bb3c34a03316d6fd7b5
Parents: b056a73
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Tue Aug 4 17:51:05 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Tue Aug 4 17:51:05 2015 +0300
----------------------------------------------------------------------
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 ++
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 +++++++++++++++++++
4 files changed, 147 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index d6a8b9e..1a75926 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -63,5 +63,6 @@ CONFIGS="\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds sql-query-join-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds sql-query-join-offheap-1-backup,\
-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b 1 -w 60 -d 300 -jdbc jdbc:ignite://127.0.0.1/query -t 64 -sm PRIMARY_SYNC -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds sql-query-jdbc-1-backup\
"
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index b2c976a..c77cc9a 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -180,8 +180,6 @@
</list>
</property>
- <property name="connectorConfiguration"><null/></property>
-
<property name="includeEventTypes">
<list/>
</property>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/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 1562b26..5eb7060 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
@@ -106,6 +106,17 @@ public class IgniteBenchmarkArguments {
@Parameter(names = {"-col", "--collocated"}, description = "Collocated")
private boolean collocated;
+ /** */
+ @Parameter(names = {"-jdbc", "--jdbcUrl"}, description = "JDBC url")
+ private String jdbcUrl;
+
+ /**
+ * @return JDBC url.
+ */
+ public String jdbcUrl() {
+ return jdbcUrl;
+ }
+
/**
* @return Transaction concurrency.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/52c1dfa3/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java
new file mode 100644
index 0000000..0ded2bd
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteJdbcSqlQueryBenchmark.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.yardstick.cache;
+
+import org.apache.ignite.*;
+import org.apache.ignite.yardstick.cache.model.Person;
+import org.yardstickframework.BenchmarkConfiguration;
+
+import javax.cache.Cache;
+import java.sql.*;
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ThreadLocalRandom;
+
+import static org.yardstickframework.BenchmarkUtils.println;
+
+/**
+ * Ignite benchmark that performs query operations.
+ */
+public class IgniteJdbcSqlQueryBenchmark extends IgniteCacheAbstractBenchmark {
+ /** Statements for closing. */
+ Set<PreparedStatement> stms = Collections.synchronizedSet(new HashSet<PreparedStatement>());
+
+ /** {@inheritDoc} */
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+
+ println(cfg, "Populating query data...");
+
+ long start = System.nanoTime();
+
+ try (IgniteDataStreamer<Integer, Person> dataLdr = ignite().dataStreamer(cache.getName())) {
+ for (int i = 0; i < args.range() && !Thread.currentThread().isInterrupted(); i++) {
+ dataLdr.addData(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
+
+ if (i % 100000 == 0)
+ println(cfg, "Populated persons: " + i);
+ }
+ }
+
+ println(cfg, "Finished populating query data in " + ((System.nanoTime() - start) / 1_000_000) + " ms.");
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ PreparedStatement stm = (PreparedStatement)ctx.get(0);
+
+ if (stm == null) {
+ stm = createStatement();
+
+ stms.add(stm);
+
+ ctx.put(0, stm);
+ }
+
+ double salary = ThreadLocalRandom.current().nextDouble() * args.range() * 1000;
+
+ double maxSalary = salary + 1000;
+
+ stm.clearParameters();
+
+ stm.setDouble(1, salary);
+ stm.setDouble(2, maxSalary);
+
+ ResultSet rs = stm.executeQuery();
+
+ while (rs.next()) {
+ double sal = rs.getDouble("salary");
+
+ if (sal < salary || sal > maxSalary)
+ throw new Exception("Invalid person retrieved [min=" + salary + ", max=" + maxSalary + ']');
+ }
+
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void tearDown() throws Exception {
+ for (PreparedStatement stm : stms) {
+ try {
+ stm.getConnection().close();
+
+ stm.close();
+ }
+ catch (Exception ignore) {
+ println("Failed to close connection." + stm);
+ }
+ }
+
+ super.tearDown();
+ }
+
+ /**
+ * @return Prepared statement.
+ * @throws Exception
+ */
+ private PreparedStatement createStatement() throws Exception {
+ Class.forName("org.apache.ignite.IgniteJdbcDriver");
+
+ Connection conn = null;
+
+ try {
+ conn = DriverManager.getConnection(args.jdbcUrl());
+
+ return conn.prepareStatement("select * from Person where salary >= ? and salary <= ?");
+ }
+ catch (Exception e) {
+ if (conn != null)
+ conn.close();
+
+ throw new IgniteException("Failed to create prepare statement.", e);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override protected IgniteCache<Integer, Object> cache() {
+ return ignite().cache("query");
+ }
+}
[12/32] incubator-ignite git commit: IGNITE-1157 Fix problems found
on review.
Posted by vo...@apache.org.
IGNITE-1157 Fix problems found on review.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a1543cfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a1543cfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a1543cfe
Branch: refs/heads/ignite-gg-9615
Commit: a1543cfe4ce435adcc08e3680d19da8b63a3d945
Parents: 45aa598
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 15:22:27 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 15:22:27 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridLogThrottle.java | 36 ++++++++++++++------
1 file changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1543cfe/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
index f37cfea..607b17b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLogThrottle.java
@@ -18,9 +18,9 @@
package org.apache.ignite.internal.util;
import org.apache.ignite.*;
-import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -42,7 +42,7 @@ public class GridLogThrottle {
private static int throttleTimeout = DFLT_THROTTLE_TIMEOUT;
/** Errors. */
- private static final ConcurrentMap<GridTuple3<Class<? extends Throwable>, String, Boolean>, Long> errors =
+ private static final ConcurrentMap<IgniteBiTuple<Class<? extends Throwable>, String>, Long> errors =
new ConcurrentHashMap8<>();
/**
@@ -95,6 +95,7 @@ public class GridLogThrottle {
* @param log Logger.
* @param e Error (optional).
* @param msg Message.
+ * @param quite Print warning anyway.
*/
public static void warn(@Nullable IgniteLogger log, @Nullable Throwable e, String msg, boolean quite) {
assert !F.isEmpty(msg);
@@ -121,11 +122,22 @@ public class GridLogThrottle {
*
* @param log Logger.
* @param msg Message.
+ * @param quite Print info anyway.
*/
- public static void info(@Nullable IgniteLogger log, String msg) {
+ public static void info(@Nullable IgniteLogger log, String msg, boolean quite) {
assert !F.isEmpty(msg);
- log(log, null, msg, null, LogLevel.INFO, false);
+ log(log, null, msg, null, LogLevel.INFO, quite);
+ }
+
+ /**
+ * Logs info if needed.
+ *
+ * @param log Logger.
+ * @param msg Message.
+ */
+ public static void info(@Nullable IgniteLogger log, String msg) {
+ info(log, msg, false);
}
/**
@@ -149,9 +161,9 @@ public class GridLogThrottle {
LogLevel level, boolean quiet) {
assert !F.isEmpty(longMsg);
- GridTuple3<Class<? extends Throwable>, String, Boolean> tup =
- e != null ? F.<Class<? extends Throwable>, String, Boolean>t(e.getClass(), e.getMessage(), quiet) :
- F.<Class<? extends Throwable>, String, Boolean>t(null, longMsg, quiet);
+ IgniteBiTuple<Class<? extends Throwable>, String> tup =
+ e != null ? F.<Class<? extends Throwable>, String>t(e.getClass(), e.getMessage()) :
+ F.<Class<? extends Throwable>, String>t(null, longMsg);
while (true) {
Long loggedTs = errors.get(tup);
@@ -177,7 +189,7 @@ public class GridLogThrottle {
* @param newStamp New timestamp.
* @return {@code True} if throttle value was replaced.
*/
- private static boolean replace(GridTuple3<Class<? extends Throwable>, String, Boolean> t, @Nullable Long oldStamp,
+ private static boolean replace(IgniteBiTuple<Class<? extends Throwable>, String> t, @Nullable Long oldStamp,
Long newStamp) {
assert newStamp != null;
@@ -222,8 +234,12 @@ public class GridLogThrottle {
/** Info level. */
INFO {
@Override public void doLog(IgniteLogger log, String longMsg, String shortMsg, Throwable e, boolean quiet) {
- if (log.isInfoEnabled())
- log.info(longMsg);
+ if (quiet)
+ U.quietAndInfo(log, longMsg);
+ else {
+ if (log.isInfoEnabled())
+ log.info(longMsg);
+ }
}
};
[11/32] incubator-ignite git commit: Merge branches 'ignite-1.3.3'
and 'ignite-support804' of
https://git-wip-us.apache.org/repos/asf/incubator-ignite into
ignite-support804
Posted by vo...@apache.org.
Merge branches 'ignite-1.3.3' and 'ignite-support804' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-support804
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/015d9cd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/015d9cd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/015d9cd5
Branch: refs/heads/ignite-gg-9615
Commit: 015d9cd5397d9d24489cfe757df36192b83ebcfe
Parents: 23377fe 12cbe22
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Aug 3 15:12:10 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Aug 3 15:12:10 2015 +0300
----------------------------------------------------------------------
.../apache/ignite/IgniteSystemProperties.java | 2 +-
.../org/apache/ignite/internal/IgnitionEx.java | 17 +-------
.../processors/cache/GridCacheProcessor.java | 10 ++++-
.../processors/cache/GridCacheUtils.java | 1 -
.../ignite/internal/util/IgniteUtils.java | 16 ++++++++
.../parser/dialect/OracleMetadataDialect.java | 4 +-
.../src/test/java/config/ignite-test-config.xml | 43 ++++++++++++++++++++
.../ignite/internal/GridFactorySelfTest.java | 9 ++++
8 files changed, 80 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
[17/32] incubator-ignite git commit: master - query restart tests fix
Posted by vo...@apache.org.
master - query restart tests fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/90adeae9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/90adeae9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/90adeae9
Branch: refs/heads/ignite-gg-9615
Commit: 90adeae9dd57f0aaaabe5f244d5167853a0b48dc
Parents: 38810b6
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 20:30:00 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 20:30:00 2015 +0300
----------------------------------------------------------------------
.../h2/twostep/GridReduceQueryExecutor.java | 34 ++++++++++++++++++--
1 file changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90adeae9/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index cde3288..ac269db 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -150,8 +150,7 @@ public class GridReduceQueryExecutor {
for (QueryRun r : runs.values()) {
for (GridMergeTable tbl : r.tbls) {
if (tbl.getScanIndex(null).hasSource(nodeId)) {
- // Will attempt to retry. If reduce query was started it will fail on next page fetching.
- retry(r, h2.readyTopologyVersion(), nodeId);
+ handleNodeLeft(r, nodeId);
break;
}
@@ -162,6 +161,15 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param r Query run.
+ * @param nodeId Left node ID.
+ */
+ private void handleNodeLeft(QueryRun r, UUID nodeId) {
+ // Will attempt to retry. If reduce query was started it will fail on next page fetching.
+ retry(r, h2.readyTopologyVersion(), nodeId);
+ }
+
+ /**
* @param nodeId Node ID.
* @param msg Message.
*/
@@ -515,7 +523,7 @@ public class GridReduceQueryExecutor {
if (send(nodes,
new GridQueryRequest(qryReqId, r.pageSize, space, mapQrys, topVer, extraSpaces, null), partsMap)) {
- U.await(r.latch);
+ awaitAllReplies(r, nodes);
Object state = r.state.get();
@@ -595,6 +603,26 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param r Query run.
+ * @param nodes Nodes to check periodically if they alive.
+ * @throws IgniteInterruptedCheckedException If interrupted.
+ */
+ private void awaitAllReplies(QueryRun r, Collection<ClusterNode> nodes)
+ throws IgniteInterruptedCheckedException {
+ while (!U.await(r.latch, 500, TimeUnit.MILLISECONDS)) {
+ for (ClusterNode node : nodes) {
+ if (!ctx.discovery().alive(node)) {
+ handleNodeLeft(r, node.id());
+
+ assert r.latch.getCount() == 0;
+
+ return;
+ }
+ }
+ }
+ }
+
+ /**
* Calculates data nodes for replicated caches on unstable topology.
*
* @param cctx Cache context for main space.
[02/32] incubator-ignite git commit: ignite-support804 - switched to
a system pool
Posted by vo...@apache.org.
ignite-support804 - switched to a system pool
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/23377fe0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/23377fe0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/23377fe0
Branch: refs/heads/ignite-gg-9615
Commit: 23377fe02157c749d64941f0ce1dcd58c8445d04
Parents: 77e3976
Author: S.Vladykin <sv...@gridgain.com>
Authored: Thu Jul 30 11:51:34 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Thu Jul 30 11:51:34 2015 +0300
----------------------------------------------------------------------
.../processors/query/h2/twostep/GridMapQueryExecutor.java | 7 ++++---
.../processors/query/h2/twostep/GridReduceQueryExecutor.java | 7 +++++--
2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23377fe0/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index 0f38353..6ab1a1b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -50,6 +50,7 @@ import java.util.concurrent.atomic.*;
import static org.apache.ignite.events.EventType.*;
import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.*;
import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.*;
+import static org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.*;
import static org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2ValueMessageFactory.*;
/**
@@ -495,7 +496,7 @@ public class GridMapQueryExecutor {
if (node.isLocal())
h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
else
- ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
+ ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
}
catch (Exception e) {
e.addSuppressed(err);
@@ -556,7 +557,7 @@ public class GridMapQueryExecutor {
if (loc)
h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
else
- ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
+ ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
}
catch (IgniteCheckedException e) {
log.error("Failed to send message.", e);
@@ -583,7 +584,7 @@ public class GridMapQueryExecutor {
if (loc)
h2.reduceQueryExecutor().onMessage(ctx.localNodeId(), msg);
else
- ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, GridIoPolicy.PUBLIC_POOL);
+ ctx.io().send(node, GridTopic.TOPIC_QUERY, msg, QUERY_POOL);
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/23377fe0/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index 32d1c95..ffa2bc0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -63,6 +63,9 @@ import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVer
* Reduce query executor.
*/
public class GridReduceQueryExecutor {
+ /** Thread pool to process query messages. */
+ public static final byte QUERY_POOL = GridIoPolicy.SYSTEM_POOL;
+
/** */
private GridKernalContext ctx;
@@ -248,7 +251,7 @@ public class GridReduceQueryExecutor {
if (node.isLocal())
h2.mapQueryExecutor().onMessage(ctx.localNodeId(), msg0);
else
- ctx.io().send(node, GridTopic.TOPIC_QUERY, msg0, GridIoPolicy.PUBLIC_POOL);
+ ctx.io().send(node, GridTopic.TOPIC_QUERY, msg0, QUERY_POOL);
}
catch (IgniteCheckedException e) {
throw new CacheException("Failed to fetch data from node: " + node.id(), e);
@@ -855,7 +858,7 @@ public class GridReduceQueryExecutor {
}
try {
- ctx.io().send(node, GridTopic.TOPIC_QUERY, copy(msg, node, partsMap), GridIoPolicy.PUBLIC_POOL);
+ ctx.io().send(node, GridTopic.TOPIC_QUERY, copy(msg, node, partsMap), QUERY_POOL);
}
catch (IgniteCheckedException e) {
ok = false;
[23/32] incubator-ignite git commit: minor
Posted by vo...@apache.org.
minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c391165e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c391165e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c391165e
Branch: refs/heads/ignite-gg-9615
Commit: c391165e6eed8b37def78663db9870f5d809da19
Parents: 44aacec
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Wed Aug 5 15:01:00 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Wed Aug 5 15:01:00 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 5 +++++
modules/log4j2/README.txt | 15 ++++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c391165e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index 3216166..18a540c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1889,6 +1889,11 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi, T
impl.brakeConnection();
}
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(TcpDiscoverySpi.class, this);
+ }
+
/**
* Socket timeout object.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c391165e/modules/log4j2/README.txt
----------------------------------------------------------------------
diff --git a/modules/log4j2/README.txt b/modules/log4j2/README.txt
index 47d01d2..6e21b7a 100644
--- a/modules/log4j2/README.txt
+++ b/modules/log4j2/README.txt
@@ -5,7 +5,20 @@ Apache Ignite Log4J2 module provides IgniteLogger implementation based on Apache
To enable Log4J2 module when starting a standalone node, move 'optional/ignite-log4j2' folder to
'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
-be added to classpath in this case.
+be added to classpath in this case. Also it is needed to configure ignite logger with Log4J2Logger
+and provide log4j2 configuration.
+
+To enable ignite logging with default configuration use:
+
+<bean class="org.apache.ignite.configuration.IgniteConfiguration">
+ ...
+ <property name="gridLogger">
+ <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+ <constructor-arg type="java.lang.String" value="config/ignite-log4j2.xml"/>
+ </bean>
+ </property>
+ ...
+</bean>
Importing Log4J2 Module In Maven Project
---------------------------------------
[04/32] incubator-ignite git commit: IGNITE-1172 CacheMetricsMBeans
registered/unregistred on start/stop cache.
Posted by vo...@apache.org.
IGNITE-1172 CacheMetricsMBeans registered/unregistred on start/stop cache.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9389c6e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9389c6e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9389c6e3
Branch: refs/heads/ignite-gg-9615
Commit: 9389c6e3ed79e5b9800b5aec076fbfee843c38ec
Parents: 83d7b27
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Aug 3 12:12:49 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Aug 3 12:12:49 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheProcessor.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9389c6e3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 77d41f8..fc6054b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,7 +497,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getAffinityMapper(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
- if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
+ if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cctx.cache().name())
+ && !CU.isSystemCache(cctx.cache().name()))
cleanup(cfg, cctx.cache().name(), false);
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
@@ -1359,7 +1360,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheCtx.cache(dht);
}
- if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
+ if (cfg.isStatisticsEnabled() && !CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
prepare(cfg, cache.mxBean(), false);
return ret;
[21/32] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by vo...@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/c087be21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c087be21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c087be21
Branch: refs/heads/ignite-gg-9615
Commit: c087be21760dd8ab34a0b2a43f7f10f7a5203e41
Parents: b683b8f 01c3e09
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Aug 5 00:27:37 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Aug 5 00:27:37 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheSwapPreloadSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
[32/32] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-gg-9615
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-gg-9615
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ac3e73bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ac3e73bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ac3e73bf
Branch: refs/heads/ignite-gg-9615
Commit: ac3e73bf61ded529c75b188205457c8d79b865e7
Parents: 9ed0b61 6e496e6
Author: ptupitsyn <pt...@gridgain.com>
Authored: Thu Aug 6 14:02:34 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Thu Aug 6 14:02:34 2015 +0300
----------------------------------------------------------------------
assembly/release-hadoop.xml | 5 +
.../processors/cache/GridCacheProcessor.java | 10 +-
.../processors/cache/GridCacheUtils.java | 1 -
.../ignite/internal/util/GridLogThrottle.java | 63 +++++++--
.../ignite/spi/discovery/tcp/ClientImpl.java | 27 +++-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +++
.../spi/discovery/tcp/TcpDiscoverySpi.java | 5 +
.../cache/GridCacheSwapPreloadSelfTest.java | 2 +
.../query/h2/twostep/GridMapQueryExecutor.java | 7 +-
.../query/h2/twostep/GridMergeIndex.java | 7 +
.../h2/twostep/GridMergeIndexUnsorted.java | 17 ++-
.../query/h2/twostep/GridMergeTable.java | 52 +++----
.../h2/twostep/GridReduceQueryExecutor.java | 69 +++++-----
...idCacheReduceQueryMultithreadedSelfTest.java | 21 ++-
modules/log4j2/README.txt | 15 ++-
.../ignite/logger/log4j2/Log4J2Logger.java | 2 +-
.../ignite/logger/log4j2/Log4j2FileAware.java | 35 -----
.../org/apache/ignite/spark/IgniteContext.scala | 19 ++-
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 ++
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 +++++++++++++++++++
parent/pom.xml | 97 +++++++-------
24 files changed, 435 insertions(+), 189 deletions(-)
----------------------------------------------------------------------
[19/32] incubator-ignite git commit: # Muted hanging test
Posted by vo...@apache.org.
# Muted hanging test
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/01c3e092
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/01c3e092
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/01c3e092
Branch: refs/heads/ignite-gg-9615
Commit: 01c3e0928fbba8d1dfa24b97d4e2506816472703
Parents: 246b94a
Author: Valentin Kulichenko <vk...@gridgain.com>
Authored: Tue Aug 4 11:25:48 2015 -0700
Committer: Valentin Kulichenko <vk...@gridgain.com>
Committed: Tue Aug 4 11:25:48 2015 -0700
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheSwapPreloadSelfTest.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/01c3e092/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 6176da4..f8e1bff 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -153,6 +153,8 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
/** @throws Exception If failed. */
private void checkSwapMultithreaded() throws Exception {
+ fail("https://issues.apache.org/jira/browse/IGNITE-614");
+
final AtomicBoolean done = new AtomicBoolean();
IgniteInternalFuture<?> fut = null;
[22/32] incubator-ignite git commit: Merge branch 'ignite-1.3.3'
Posted by vo...@apache.org.
Merge branch 'ignite-1.3.3'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/44aaceca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/44aaceca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/44aaceca
Branch: refs/heads/ignite-gg-9615
Commit: 44aaceca596f5d4b738f9da8d12e9af4e0431379
Parents: c087be2 7d747d2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Aug 5 11:27:50 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Aug 5 11:27:50 2015 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheProcessor.java | 10 +++-
.../processors/cache/GridCacheUtils.java | 1 -
.../ignite/internal/util/GridLogThrottle.java | 63 +++++++++++++++-----
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +++++
.../query/h2/twostep/GridMapQueryExecutor.java | 7 ++-
.../h2/twostep/GridReduceQueryExecutor.java | 7 ++-
8 files changed, 87 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/44aaceca/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
[30/32] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by vo...@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/b0315250
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0315250
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0315250
Branch: refs/heads/ignite-gg-9615
Commit: b03152504cb5d8da0d57b3a712cadd9a4aea4a83
Parents: 33e174b 5ce8bc6
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:05:43 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:05:43 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ClientImpl.java | 28 +++++++++++++++-----
1 file changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
[26/32] incubator-ignite git commit: # ignite-1198
Posted by vo...@apache.org.
# ignite-1198
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2173b0e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2173b0e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2173b0e1
Branch: refs/heads/ignite-gg-9615
Commit: 2173b0e1500d3dbc198a610042fca9b92d4f7de7
Parents: 023ffe0
Author: Alexey Goncharuk <ag...@gridgain.com>
Authored: Wed Aug 5 14:05:07 2015 -0700
Committer: Alexey Goncharuk <ag...@gridgain.com>
Committed: Wed Aug 5 14:25:13 2015 -0700
----------------------------------------------------------------------
.../org/apache/ignite/spark/IgniteContext.scala | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2173b0e1/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
----------------------------------------------------------------------
diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
index 5267244a..6e48017 100644
--- a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
+++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteContext.scala
@@ -19,7 +19,8 @@ package org.apache.ignite.spark
import org.apache.ignite.internal.IgnitionEx
-import org.apache.ignite.{Ignition, Ignite}
+import org.apache.ignite.internal.util.IgniteUtils
+import org.apache.ignite.{IgniteSystemProperties, Ignition, Ignite}
import org.apache.ignite.configuration.{CacheConfiguration, IgniteConfiguration}
import org.apache.spark.{Logging, SparkContext}
import org.apache.spark.sql.SQLContext
@@ -41,8 +42,12 @@ class IgniteContext[K, V](
private val cfgClo = new Once(cfgF)
+ private val igniteHome = IgniteUtils.getIgniteHome
+
if (!client) {
- val workers = sparkContext.getExecutorStorageStatus.length - 1
+ // Get required number of executors with default equals to number of available executors.
+ val workers = sparkContext.getConf.getInt("spark.executor.instances",
+ sparkContext.getExecutorStorageStatus.length)
if (workers <= 0)
throw new IllegalStateException("No Spark executors found to start Ignite nodes.")
@@ -125,6 +130,16 @@ class IgniteContext[K, V](
* @return Ignite instance.
*/
def ignite(): Ignite = {
+ val home = IgniteUtils.getIgniteHome
+
+ if (home == null && igniteHome != null) {
+ logInfo("Setting IGNITE_HOME from driver not as it is not available on this worker: " + igniteHome)
+
+ IgniteUtils.nullifyHomeDirectory()
+
+ System.setProperty(IgniteSystemProperties.IGNITE_HOME, igniteHome)
+ }
+
val igniteCfg = cfgClo()
try {
[31/32] incubator-ignite git commit: License generation hotfix
Posted by vo...@apache.org.
License generation hotfix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6e496e67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6e496e67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6e496e67
Branch: refs/heads/ignite-gg-9615
Commit: 6e496e67e7b3a1c7cd6e31555a3198a833252f1d
Parents: b031525
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:44:36 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:44:36 2015 +0300
----------------------------------------------------------------------
parent/pom.xml | 97 ++++++++++++++++++++++++++---------------------------
1 file changed, 48 insertions(+), 49 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e496e67/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index e703502..efa6494 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -140,6 +140,13 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-apache-license-gen</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope><!-- hack to have ignite-apache-license-gen at first place at mvn reactor -->
+ </dependency>
</dependencies>
<build>
@@ -567,60 +574,52 @@
</execution>
</executions>
</plugin>
+
+ <plugin><!-- generates dependencies licenses -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ignite-dependencies</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+ <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
+ </resourceBundles>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>licenses-file-rename</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>compile</phase>
+ <configuration>
+ <target>
+ <!-- moving licenses generated by "ignite-dependencies" -->
+ <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
+ </target>
+ <failOnError>false</failOnError>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
<profile>
- <id>apache-release</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>ignite-dependencies</id>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
- <resourceBundle>org.apache.ignite:ignite-apache-license-gen:${project.version}</resourceBundle>
- </resourceBundles>
- <excludeTransitive>true</excludeTransitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>licenses-file-rename</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>compile</phase>
- <configuration>
- <target>
- <!-- moving licenses generated by "ignite-dependencies" -->
- <move file="${basedir}/target/classes/META-INF/licenses.txt" tofile="${basedir}/target/licenses/${project.artifactId}-licenses.txt"/>
- </target>
- <failOnError>false</failOnError>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>check-licenses</id>
<build>
<plugins>
[13/32] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1157' into ignite-1.3.3
Posted by vo...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1157' into ignite-1.3.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7d747d2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7d747d2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7d747d2a
Branch: refs/heads/ignite-gg-9615
Commit: 7d747d2aca6bdee21ca1c300b17d9cad709f38a2
Parents: 015d9cd a1543cf
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 16:21:04 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 16:21:04 2015 +0300
----------------------------------------------------------------------
.../ignite/internal/util/GridLogThrottle.java | 63 +++++++++++++++-----
.../ignite/spi/discovery/tcp/ClientImpl.java | 5 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 5 +-
.../spi/discovery/tcp/TcpDiscoveryImpl.java | 15 +++++
4 files changed, 70 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
[06/32] incubator-ignite git commit: IGNITE-1185 Locate configuration
in class path. (cherry picked from commit 518b623)
Posted by vo...@apache.org.
IGNITE-1185 Locate configuration in class path.
(cherry picked from commit 518b623)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/754da7a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/754da7a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/754da7a1
Branch: refs/heads/ignite-gg-9615
Commit: 754da7a19b8d645c6497b2cdfee320cb922990fc
Parents: 41c76a7
Author: sevdokimov <se...@gridgain.com>
Authored: Mon Aug 3 12:48:35 2015 +0300
Committer: sevdokimov <se...@gridgain.com>
Committed: Mon Aug 3 14:15:19 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/IgnitionEx.java | 17 +----------------
.../apache/ignite/internal/util/IgniteUtils.java | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/754da7a1/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 73de99a..3790703 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -583,22 +583,7 @@ public class IgnitionEx {
public static IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext>
loadConfigurations(String springCfgPath) throws IgniteCheckedException {
A.notNull(springCfgPath, "springCfgPath");
-
- URL url;
-
- try {
- url = new URL(springCfgPath);
- }
- catch (MalformedURLException e) {
- url = U.resolveIgniteUrl(springCfgPath);
-
- if (url == null)
- throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath +
- ". Note that this path should be either absolute or a relative local file system path, " +
- "relative to META-INF in classpath or valid URL to IGNITE_HOME.", e);
- }
-
- return loadConfigurations(url);
+ return loadConfigurations(IgniteUtils.resolveSpringUrl(springCfgPath));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/754da7a1/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 6bd361f..ee07743 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3308,6 +3308,9 @@ public abstract class IgniteUtils {
url = U.resolveIgniteUrl(springCfgPath);
if (url == null)
+ url = resolveInClasspath(springCfgPath);
+
+ if (url == null)
throw new IgniteCheckedException("Spring XML configuration path is invalid: " + springCfgPath +
". Note that this path should be either absolute or a relative local file system path, " +
"relative to META-INF in classpath or valid URL to IGNITE_HOME.", e);
@@ -3317,6 +3320,19 @@ public abstract class IgniteUtils {
}
/**
+ * @param path Resource path.
+ * @return Resource URL inside jar. Or {@code null}.
+ */
+ @Nullable private static URL resolveInClasspath(String path) {
+ ClassLoader clsLdr = Thread.currentThread().getContextClassLoader();
+
+ if (clsLdr == null)
+ return null;
+
+ return clsLdr.getResource(path.replaceAll("\\\\", "/"));
+ }
+
+ /**
* Gets URL representing the path passed in. First the check is made if path is absolute.
* If not, then the check is made if path is relative to {@code META-INF} folder in classpath.
* If not, then the check is made if path is relative to ${IGNITE_HOME}.
[29/32] incubator-ignite git commit: master ignite-1207
Posted by vo...@apache.org.
master ignite-1207
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/33e174bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/33e174bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/33e174bb
Branch: refs/heads/ignite-gg-9615
Commit: 33e174bb9a8c9d79c66962449cf0d5403b921aed
Parents: 2173b0e
Author: Anton Vinogradov <vi...@gmail.com>
Authored: Thu Aug 6 13:03:44 2015 +0300
Committer: Anton Vinogradov <vi...@gmail.com>
Committed: Thu Aug 6 13:03:44 2015 +0300
----------------------------------------------------------------------
assembly/release-hadoop.xml | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33e174bb/assembly/release-hadoop.xml
----------------------------------------------------------------------
diff --git a/assembly/release-hadoop.xml b/assembly/release-hadoop.xml
index 7b94144..3f61ec9 100644
--- a/assembly/release-hadoop.xml
+++ b/assembly/release-hadoop.xml
@@ -58,6 +58,11 @@
<source>modules/hadoop/config/hive-site.ignite.xml</source>
<outputDirectory>/config/hadoop</outputDirectory>
</file>
+
+ <file>
+ <source>modules/hadoop/docs/HADOOP_README.txt</source>
+ <outputDirectory>/</outputDirectory>
+ </file>
</files>
<fileSets>
[16/32] incubator-ignite git commit: Merge remote-tracking branch
'origin/master'
Posted by vo...@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/38810b63
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/38810b63
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/38810b63
Branch: refs/heads/ignite-gg-9615
Commit: 38810b639fbcf6f5a07302f02c48226f4156de9d
Parents: e1f0152 52c1dfa
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 17:52:08 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 17:52:08 2015 +0300
----------------------------------------------------------------------
.../yardstick/config/benchmark-query.properties | 3 +-
modules/yardstick/config/ignite-base-config.xml | 2 -
.../yardstick/IgniteBenchmarkArguments.java | 11 ++
.../cache/IgniteJdbcSqlQueryBenchmark.java | 134 +++++++++++++++++++
4 files changed, 147 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[27/32] incubator-ignite git commit: msg format
Posted by vo...@apache.org.
msg format
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d7623b47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d7623b47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d7623b47
Branch: refs/heads/ignite-gg-9615
Commit: d7623b47abea23c685856b36ade75027efbb3cc5
Parents: 2173b0e
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Thu Aug 6 12:38:24 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Thu Aug 6 12:38:24 2015 +0300
----------------------------------------------------------------------
.../ignite/spi/discovery/tcp/ClientImpl.java | 27 +++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d7623b47/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index 0f9c100..d5d6ea2 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -29,6 +29,7 @@ import org.apache.ignite.lang.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.discovery.*;
import org.apache.ignite.spi.discovery.tcp.internal.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.*;
import org.apache.ignite.spi.discovery.tcp.messages.*;
import org.jetbrains.annotations.*;
import org.jsr166.*;
@@ -159,7 +160,9 @@ class ClientImpl extends TcpDiscoveryImpl {
/** {@inheritDoc} */
@Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
- spi.initLocalNode(0, true);
+ spi.initLocalNode(
+ 0,
+ true);
locNode = spi.locNode;
@@ -190,7 +193,10 @@ class ClientImpl extends TcpDiscoveryImpl {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
- timer.schedule(new HeartbeatSender(), spi.hbFreq, spi.hbFreq);
+ timer.schedule(
+ new HeartbeatSender(),
+ spi.hbFreq,
+ spi.hbFreq);
spi.printStartInfo();
}
@@ -408,7 +414,11 @@ class ClientImpl extends TcpDiscoveryImpl {
if (timeout > 0 && (U.currentTimeMillis() - startTime) > timeout)
return null;
- LT.warn(log, null, "No addresses registered in the IP finder (will retry in 2000ms): "
+ LT.warn(log, null, "IP finder returned empty addresses list. " +
+ "Please check IP finder configuration" +
+ (spi.ipFinder instanceof TcpDiscoveryMulticastIpFinder ?
+ " and make sure multicast works on your network. " : ". ") +
+ "Will retry every 2 secs."
+ spi.ipFinder, true);
Thread.sleep(2000);
@@ -460,7 +470,7 @@ class ClientImpl extends TcpDiscoveryImpl {
return null;
LT.warn(log, null, "Failed to connect to any address from IP finder (will retry to join topology " +
- "in 2000ms): " + toOrderedList(addrs0), true);
+ "every 2 secs): " + toOrderedList(addrs0), true);
Thread.sleep(2000);
}
@@ -682,7 +692,9 @@ class ClientImpl extends TcpDiscoveryImpl {
U.interrupt(msgWorker);
U.join(sockWriter, log);
- U.join(msgWorker, log);
+ U.join(
+ msgWorker,
+ log);
}
/** {@inheritDoc} */
@@ -987,7 +999,10 @@ class ClientImpl extends TcpDiscoveryImpl {
}
}
- spi.writeToSocket(sock, msg, socketTimeout);
+ spi.writeToSocket(
+ sock,
+ msg,
+ socketTimeout);
msg = null;
[20/32] incubator-ignite git commit: master - minor refactoring
Posted by vo...@apache.org.
master - minor refactoring
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b683b8f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b683b8f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b683b8f8
Branch: refs/heads/ignite-gg-9615
Commit: b683b8f80b59696933d52ad2c79321b374e4e6b4
Parents: 246b94a
Author: S.Vladykin <sv...@gridgain.com>
Authored: Wed Aug 5 00:27:18 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Wed Aug 5 00:27:18 2015 +0300
----------------------------------------------------------------------
.../query/h2/twostep/GridMergeIndexUnsorted.java | 8 +-------
.../processors/query/h2/twostep/GridMergeTable.java | 13 +++++++------
2 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index 276d25b..61aaa80 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -75,13 +75,7 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
if (page != null)
break;
- UUID nodeId = ((GridMergeTable)table).checkSourceNodesAlive();
-
- if (nodeId != null) {
- fail(nodeId);
-
- assert !queue.isEmpty();
- }
+ ((GridMergeTable)table).checkSourceNodesAlive();
}
if (page.isLast())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b683b8f8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index fd9eec3..0b335d3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -54,15 +54,16 @@ public class GridMergeTable extends TableBase {
}
/**
- * @return Failed node or {@code null} if all alive.
+ * Fails merge table if any source node is left.
*/
- public UUID checkSourceNodesAlive() {
+ public void checkSourceNodesAlive() {
for (UUID nodeId : idx.sources()) {
- if (!ctx.discovery().alive(nodeId))
- return nodeId;
- }
+ if (!ctx.discovery().alive(nodeId)) {
+ idx.fail(nodeId);
- return null;
+ return;
+ }
+ }
}
/** {@inheritDoc} */
[15/32] incubator-ignite git commit: master - test fix
Posted by vo...@apache.org.
master - test fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e1f01529
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e1f01529
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e1f01529
Branch: refs/heads/ignite-gg-9615
Commit: e1f01529fa9d19641cb276551375cd8bd739da6d
Parents: b056a73
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 17:51:40 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 17:51:40 2015 +0300
----------------------------------------------------------------------
...idCacheReduceQueryMultithreadedSelfTest.java | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e1f01529/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
index c3290a6..f890dee 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReduceQueryMultithreadedSelfTest.java
@@ -21,6 +21,9 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.util.typedef.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
import java.util.*;
import java.util.concurrent.*;
@@ -39,6 +42,9 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
/** */
private static final int TEST_TIMEOUT = 2 * 60 * 1000;
+ /** */
+ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
+
/** {@inheritDoc} */
@Override protected int gridCount() {
return GRID_CNT;
@@ -50,8 +56,21 @@ public class GridCacheReduceQueryMultithreadedSelfTest extends GridCacheAbstract
}
/** {@inheritDoc} */
+ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+ IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+ TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+ disco.setIpFinder(ipFinder);
+
+ cfg.setDiscoverySpi(disco);
+
+ return cfg;
+ }
+
+ /** {@inheritDoc} */
@Override protected CacheConfiguration cacheConfiguration(String gridName) throws Exception {
- CacheConfiguration cfg = super.cacheConfiguration(gridName);
+ CacheConfiguration<?,?> cfg = super.cacheConfiguration(gridName);
cfg.setCacheMode(PARTITIONED);
cfg.setBackups(1);
[03/32] incubator-ignite git commit: IGNITE-1172 CacheMetricsMBeans
registered/unregistred on start/stop cache.
Posted by vo...@apache.org.
IGNITE-1172 CacheMetricsMBeans registered/unregistred on start/stop cache.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/83d7b273
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/83d7b273
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/83d7b273
Branch: refs/heads/ignite-gg-9615
Commit: 83d7b2734db4a418e05de730d8ca9c773ba8766c
Parents: f82fb5c
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Fri Jul 31 19:27:16 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Fri Jul 31 18:33:02 2015 +0300
----------------------------------------------------------------------
.../internal/processors/cache/GridCacheProcessor.java | 10 ++++++++--
.../ignite/internal/processors/cache/GridCacheUtils.java | 1 -
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83d7b273/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index bb87a86..77d41f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -497,6 +497,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cleanup(cfg, cfg.getAffinityMapper(), false);
cleanup(cfg, cctx.store().configuredStore(), false);
+ if (!CU.isUtilityCache(cctx.cache().name()) && !CU.isSystemCache(cctx.cache().name()))
+ cleanup(cfg, cctx.cache().name(), false);
+
NearCacheConfiguration nearCfg = cfg.getNearConfiguration();
if (nearCfg != null)
@@ -1356,6 +1359,9 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheCtx.cache(dht);
}
+ if (!CU.isUtilityCache(cache.name()) && !CU.isSystemCache(cache.name()))
+ prepare(cfg, cache.mxBean(), false);
+
return ret;
}
@@ -2940,7 +2946,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheName = near ? cacheName + "-near" : cacheName;
for (Class<?> itf : o.getClass().getInterfaces()) {
- if (itf.getName().endsWith("MBean")) {
+ if (itf.getName().endsWith("MBean") || itf.getName().endsWith("MXBean")) {
try {
U.registerCacheMBean(srvr, ctx.gridName(), cacheName, o.getClass().getName(), o,
(Class<Object>)itf);
@@ -2973,7 +2979,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
cacheName = near ? cacheName + "-near" : cacheName;
for (Class<?> itf : o.getClass().getInterfaces()) {
- if (itf.getName().endsWith("MBean")) {
+ if (itf.getName().endsWith("MBean") || itf.getName().endsWith("MXBean")) {
try {
srvr.unregisterMBean(U.makeCacheMBeanName(ctx.gridName(), cacheName, o.getClass().getName()));
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83d7b273/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index f88e288..41e3896 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -57,7 +57,6 @@ import static org.apache.ignite.cache.CacheMode.*;
import static org.apache.ignite.cache.CacheRebalanceMode.*;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
import static org.apache.ignite.internal.GridTopic.*;
-import static org.apache.ignite.internal.IgniteNodeAttributes.*;
import static org.apache.ignite.internal.processors.cache.GridCacheOperation.*;
/**
[18/32] incubator-ignite git commit: master - query restart tests fix2
Posted by vo...@apache.org.
master - query restart tests fix2
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/246b94a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/246b94a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/246b94a8
Branch: refs/heads/ignite-gg-9615
Commit: 246b94a8bdc9901935db1865a0607a9fe48f5b23
Parents: 90adeae
Author: S.Vladykin <sv...@gridgain.com>
Authored: Tue Aug 4 21:05:13 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Tue Aug 4 21:05:13 2015 +0300
----------------------------------------------------------------------
.../query/h2/twostep/GridMergeIndex.java | 7 +++
.../h2/twostep/GridMergeIndexUnsorted.java | 23 +++++++--
.../query/h2/twostep/GridMergeTable.java | 51 ++++++++------------
.../h2/twostep/GridReduceQueryExecutor.java | 28 +----------
4 files changed, 45 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
index 2b2996d..71b207d 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndex.java
@@ -68,6 +68,13 @@ public abstract class GridMergeIndex extends BaseIndex {
}
/**
+ * @return Return source nodes for this merge index.
+ */
+ public Set<UUID> sources() {
+ return remainingRows.keySet();
+ }
+
+ /**
* @param nodeId Node ID.
* @return {@code true} If this index needs data from the given source node.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
index e0a07ec..276d25b 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexUnsorted.java
@@ -64,11 +64,24 @@ public class GridMergeIndexUnsorted extends GridMergeIndex {
while (!iter.hasNext()) {
GridResultPage page;
- try {
- page = queue.take();
- }
- catch (InterruptedException e) {
- throw new CacheException("Query execution was interrupted.", e);
+ for (;;) {
+ try {
+ page = queue.poll(500, TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e) {
+ throw new CacheException("Query execution was interrupted.", e);
+ }
+
+ if (page != null)
+ break;
+
+ UUID nodeId = ((GridMergeTable)table).checkSourceNodesAlive();
+
+ if (nodeId != null) {
+ fail(nodeId);
+
+ assert !queue.isEmpty();
+ }
}
if (page.isLast())
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
index c9cdff2..fd9eec3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeTable.java
@@ -17,7 +17,7 @@
package org.apache.ignite.internal.processors.query.h2.twostep;
-import org.h2.api.*;
+import org.apache.ignite.internal.*;
import org.h2.command.ddl.*;
import org.h2.engine.*;
import org.h2.index.*;
@@ -32,6 +32,9 @@ import java.util.*;
*/
public class GridMergeTable extends TableBase {
/** */
+ private final GridKernalContext ctx;
+
+ /** */
private final ArrayList<Index> idxs = new ArrayList<>(1);
/** */
@@ -39,15 +42,29 @@ public class GridMergeTable extends TableBase {
/**
* @param data Data.
+ * @param ctx Kernal context.
*/
- public GridMergeTable(CreateTableData data) {
+ public GridMergeTable(CreateTableData data, GridKernalContext ctx) {
super(data);
+ this.ctx = ctx;
idx = new GridMergeIndexUnsorted(this, "merge_scan");
idxs.add(idx);
}
+ /**
+ * @return Failed node or {@code null} if all alive.
+ */
+ public UUID checkSourceNodesAlive() {
+ for (UUID nodeId : idx.sources()) {
+ if (!ctx.discovery().alive(nodeId))
+ return nodeId;
+ }
+
+ return null;
+ }
+
/** {@inheritDoc} */
@Override public void lock(Session session, boolean exclusive, boolean force) {
// No-op.
@@ -153,34 +170,4 @@ public class GridMergeTable extends TableBase {
@Override public void checkRename() {
throw DbException.getUnsupportedException("rename");
}
-
- /**
- * Engine.
- */
- public static class Engine implements TableEngine {
- /** */
- private static ThreadLocal<GridMergeTable> createdTbl = new ThreadLocal<>();
-
- /**
- * @return Created table.
- */
- public static GridMergeTable getCreated() {
- GridMergeTable tbl = createdTbl.get();
-
- assert tbl != null;
-
- createdTbl.remove();
-
- return tbl;
- }
-
- /** {@inheritDoc} */
- @Override public Table createTable(CreateTableData data) {
- GridMergeTable tbl = new GridMergeTable(data);
-
- createdTbl.set(tbl);
-
- return tbl;
- }
- }
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/246b94a8/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index ac269db..ad8ab34 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -1096,7 +1096,7 @@ public class GridReduceQueryExecutor {
else
data.columns = planColumns();
- return new GridMergeTable(data);
+ return new GridMergeTable(data, ctx);
}
catch (Exception e) {
U.closeQuiet(conn);
@@ -1117,32 +1117,6 @@ public class GridReduceQueryExecutor {
}
/**
- * @param conn Connection.
- * @param qry Query.
- * @return Table.
- * @throws IgniteCheckedException If failed.
- */
- private GridMergeTable createTable(Connection conn, GridCacheSqlQuery qry) throws IgniteCheckedException {
- try {
- try (PreparedStatement s = conn.prepareStatement(
- "CREATE LOCAL TEMPORARY TABLE " + qry.alias() +
- " ENGINE \"" + GridMergeTable.Engine.class.getName() + "\" " +
- " AS SELECT * FROM (" + qry.query() + ") WHERE FALSE")) {
- h2.bindParameters(s, F.asList(qry.parameters()));
-
- s.execute();
- }
-
- return GridMergeTable.Engine.getCreated();
- }
- catch (SQLException e) {
- U.closeQuiet(conn);
-
- throw new IgniteCheckedException(e);
- }
- }
-
- /**
* @param reconnectFut Reconnect future.
*/
public void onDisconnected(IgniteFuture<?> reconnectFut) {