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/05 10:27:31 UTC

[01/14] incubator-ignite git commit: IGNITE-1157 Fix.

Repository: incubator-ignite
Updated Branches:
  refs/heads/master c087be217 -> 44aaceca5


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/master
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;
+    }
 }


[13/14] 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/master
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(-)
----------------------------------------------------------------------



[08/14] 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/master
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();


[05/14] 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/master
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;
     }


[06/14] 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/master
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}.


[07/14] 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/master
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> {


[11/14] 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/master
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(-)
----------------------------------------------------------------------



[09/14] 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/master
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;
     }


[10/14] 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/master
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(-)
----------------------------------------------------------------------



[02/14] 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/master
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;


[14/14] 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/master
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
----------------------------------------------------------------------


[12/14] 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/master
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);
+                }
             }
         };
 


[04/14] 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/master
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;


[03/14] 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/master
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.*;
 
 /**