You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/06/22 13:11:56 UTC

[1/6] incubator-ignite git commit: #IGNITE-GG-10449 marshal credentials in client discovery.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1043 7aaa85f6e -> c516679a4


#IGNITE-GG-10449 marshal credentials in client discovery.


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

Branch: refs/heads/ignite-1043
Commit: a3d8e603a5c9a7fbf3f81a7dd2aded2a8139f578
Parents: 1cc0000
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 11:33:53 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 11:33:53 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 23 ++++++++++++++++++++
 1 file changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a3d8e603/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 e255e08..68e5dbd 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
@@ -362,6 +362,9 @@ class ClientImpl extends TcpDiscoveryImpl {
 
         long startTime = U.currentTimeMillis();
 
+        // Marshal credentials for backward compatibility and security.
+        marshalCredentials(locNode);
+
         while (true) {
             if (Thread.currentThread().isInterrupted())
                 throw new InterruptedException();
@@ -541,6 +544,26 @@ class ClientImpl extends TcpDiscoveryImpl {
         return null;
     }
 
+    /**
+     * Marshalls credentials with discovery SPI marshaller (will replace attribute value).
+     *
+     * @param node Node to marshall credentials for.
+     * @throws IgniteSpiException If marshalling failed.
+     */
+    private void marshalCredentials(TcpDiscoveryNode node) throws IgniteSpiException {
+        try {
+            // Use security-unsafe getter.
+            Map<String, Object> attrs = new HashMap<>(node.getAttributes());
+
+            attrs.put(IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS,
+                spi.marsh.marshal(attrs.get(IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS)));
+
+            node.setAttributes(attrs);
+        }
+        catch (IgniteCheckedException e) {
+            throw new IgniteSpiException("Failed to marshal node security credentials: " + node.id(), e);
+        }
+    }
 
     /**
      * @param topVer New topology version.


[5/6] incubator-ignite git commit: Merge branch 'ignite-gg-10449' into ignite-sprint-6

Posted by sb...@apache.org.
Merge branch 'ignite-gg-10449' into ignite-sprint-6


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

Branch: refs/heads/ignite-1043
Commit: de0930d3b92141a360ea6a2cc346035158572dcf
Parents: a4ce455 7c1ecc3
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 14:05:28 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 14:05:28 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 23 ++++++++++++++++++++
 .../cache/IgniteCacheOffheapEvictQueryTest.java | 17 +++++++++++++++
 2 files changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/de0930d3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------


[3/6] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-sprint-6' into ignite-sprint-6

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-sprint-6' into ignite-sprint-6


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

Branch: refs/heads/ignite-1043
Commit: a4ce455bbff7dbbf1084a7e9cc60424b53396471
Parents: 7c70267 6f5e676
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 22 12:50:21 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 22 12:50:21 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 45 ++++++++++----------
 1 file changed, 23 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[6/6] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-6' into ignite-1043

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-6' into ignite-1043


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

Branch: refs/heads/ignite-1043
Commit: c516679a427e10869539ebec82c65b6bed29248b
Parents: 7aaa85f de0930d
Author: ivasilinets <iv...@gridgain.com>
Authored: Mon Jun 22 14:11:37 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Mon Jun 22 14:11:37 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |  3 ++
 .../communication/tcp/TcpCommunicationSpi.java  | 49 ++++++++++----------
 .../tcp/TcpCommunicationSpiMBean.java           |  8 ++++
 .../ignite/spi/discovery/tcp/ClientImpl.java    | 23 +++++++++
 .../cache/IgniteCacheOffheapEvictQueryTest.java | 17 +++++++
 5 files changed, 76 insertions(+), 24 deletions(-)
----------------------------------------------------------------------



[4/6] incubator-ignite git commit: #IGNITE-GG-10449 Fixed license.

Posted by sb...@apache.org.
#IGNITE-GG-10449 Fixed license.


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

Branch: refs/heads/ignite-1043
Commit: 7c1ecc3dd2e240e48958c8fb1fd812a6df7e92b5
Parents: a3d8e60
Author: nikolay_tikhonov <nt...@gridgain.com>
Authored: Mon Jun 22 13:15:55 2015 +0300
Committer: nikolay_tikhonov <nt...@gridgain.com>
Committed: Mon Jun 22 13:15:55 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapEvictQueryTest.java    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c1ecc3d/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index 72bfcaa..45d744e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.internal.processors.cache;
 
 import org.apache.ignite.*;


[2/6] incubator-ignite git commit: # review droppng of slow clients

Posted by sb...@apache.org.
# review droppng of slow clients


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

Branch: refs/heads/ignite-1043
Commit: 7c70267d2b4b7fc3fb7a1efda1ee785cebebcc41
Parents: 1cc0000
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Mon Jun 22 12:49:58 2015 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Jun 22 12:49:58 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |  3 ++
 .../communication/tcp/TcpCommunicationSpi.java  | 49 ++++++++++----------
 .../tcp/TcpCommunicationSpiMBean.java           |  8 ++++
 3 files changed, 36 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index b166f39..542fa30 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -236,7 +236,10 @@ public final class IgniteSystemProperties {
     /**
      * System property to disable buffered communication if node sends less messages count than
      * specified by this property. Default value is {@code 512}.
+     *
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     public static final String IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT = "IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT";
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 1ec2128..1035ee5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.util.ipc.*;
 import org.apache.ignite.internal.util.ipc.shmem.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.nio.*;
-import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.internal.util.worker.*;
@@ -51,7 +50,6 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
-import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.events.EventType.*;
 
 /**
@@ -657,9 +655,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /** Slow client queue limit. */
     private int slowClientQueueLimit;
 
-    /** Min buffered message count. */
-    private int minBufferedMsgCnt = Integer.getInteger(IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT, 512);
-
     /** NIO server. */
     private GridNioServer<Message> nioSrvr;
 
@@ -935,24 +930,29 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      *
      * @param connBufSize Connection buffer size.
      * @see #setConnectionBufferFlushFrequency(long)
+     * @deprecated Not used any more.
      */
+    @Deprecated
     @IgniteSpiConfiguration(optional = true)
     public void setConnectionBufferSize(int connBufSize) {
         // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public int getConnectionBufferSize() {
         return 0;
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @IgniteSpiConfiguration(optional = true)
     @Override public void setConnectionBufferFlushFrequency(long connBufFlushFreq) {
         // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public long getConnectionBufferFlushFrequency() {
         return 0;
     }
@@ -1156,13 +1156,14 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /**
      * Sets slow client queue limit.
      * <p/>
-     * When set to a positive number, communication SPI will monitor clients outbound queue sizes and will drop
+     * When set to a positive number, communication SPI will monitor clients outbound message queue sizes and will drop
      * those clients whose queue exceeded this limit.
      * <p/>
      * Usually this value should be set to the same value as {@link #getMessageQueueLimit()} which controls
-     * message back-pressure for server nodes. The default value for this parameter is {@link #DFLT_MSG_QUEUE_LIMIT}.
+     * message back-pressure for server nodes. The default value for this parameter is {@code 0}
+     * which means {@code unlimited}.
      *
-     * @param slowClientQueueLimit Slow cilent queue limit.
+     * @param slowClientQueueLimit Slow client queue limit.
      */
     public void setSlowClientQueueLimit(int slowClientQueueLimit) {
         this.slowClientQueueLimit = slowClientQueueLimit;
@@ -1171,20 +1172,20 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /**
      * Sets the minimum number of messages for this SPI, that are buffered
      * prior to sending.
-     * <p>
-     * Defaults to either {@code 512} or {@link IgniteSystemProperties#IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT}
-     * system property (if specified).
      *
      * @param minBufferedMsgCnt Minimum buffered message count.
+     * @deprecated Not used any more.
      */
     @IgniteSpiConfiguration(optional = true)
+    @Deprecated
     public void setMinimumBufferedMessageCount(int minBufferedMsgCnt) {
-        this.minBufferedMsgCnt = minBufferedMsgCnt;
+        // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public int getMinimumBufferedMessageCount() {
-        return minBufferedMsgCnt;
+        return 0;
     }
 
     /** {@inheritDoc} */
@@ -1248,7 +1249,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         assertParameter(shmemPort > 0 || shmemPort == -1, "shmemPort > 0 || shmemPort == -1");
         assertParameter(reconCnt > 0, "reconnectCnt > 0");
         assertParameter(selectorsCnt > 0, "selectorsCnt > 0");
-        assertParameter(minBufferedMsgCnt >= 0, "minBufferedMsgCnt >= 0");
         assertParameter(connTimeout >= 0, "connTimeout >= 0");
         assertParameter(maxConnTimeout >= connTimeout, "maxConnTimeout >= connTimeout");
         assertParameter(sockWriteTimeout >= 0, "sockWriteTimeout >= 0");
@@ -1326,7 +1326,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             log.debug(configInfo("sockRcvBuf", sockRcvBuf));
             log.debug(configInfo("shmemPort", shmemPort));
             log.debug(configInfo("msgQueueLimit", msgQueueLimit));
-            log.debug(configInfo("minBufferedMsgCnt", minBufferedMsgCnt));
             log.debug(configInfo("connTimeout", connTimeout));
             log.debug(configInfo("maxConnTimeout", maxConnTimeout));
             log.debug(configInfo("reconCnt", reconCnt));
@@ -1339,11 +1338,10 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             U.quietAndWarn(log, "'TCP_NO_DELAY' for communication is off, which should be used with caution " +
                 "since may produce significant delays with some scenarios.");
 
-        if (slowClientQueueLimit > 0 && msgQueueLimit > 0) {
-            if (slowClientQueueLimit >= msgQueueLimit) {
-                U.quietAndWarn(log, "Slow client queue limit is set to a value greater than message queue limit. " +
-                    "Slow client queue limit will have no effect.");
-            }
+        if (slowClientQueueLimit > 0 && msgQueueLimit > 0 && slowClientQueueLimit >= msgQueueLimit) {
+            U.quietAndWarn(log, "Slow client queue limit is set to a value greater than message queue limit " +
+                "(slow client queue limit will have no effect) [msgQueueLimit=" + msgQueueLimit +
+                    ", slowClientQueueLimit=" + slowClientQueueLimit + ']');
         }
 
         registerMBean(gridName, this, TcpCommunicationSpiMBean.class);
@@ -1916,13 +1914,16 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 ClusterNode node = getSpiContext().node(id);
 
                 if (node != null && node.isClient()) {
-                    String msg = "Client node outbound queue size exceeded slowClientQueueLimit, " +
-                        "the client will be dropped (consider changing \'slowClientQueueLimit\') [" +
-                        "srvNode=" + getSpiContext().localNode().id() +
+                    String msg = "Client node outbound message queue size exceeded slowClientQueueLimit, " +
+                        "the client will be dropped " +
+                        "(consider changing 'slowClientQueueLimit' configuration property) " +
+                        "[srvNode=" + getSpiContext().localNode().id() +
                         ", clientNode=" + node +
                         ", slowClientQueueLimit=" + slowClientQueueLimit + ']';
 
-                    LT.warn(log, null, msg);
+                    U.quietAndWarn(
+                        log,
+                        msg);
 
                     getSpiContext().failNode(id, msg);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
index 1971d99..067ca41 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
@@ -168,7 +168,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean {
      * connection buffer.
      *
      * @return Flush frequency.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Connection buffer flush frequency.")
     public long getConnectionBufferFlushFrequency();
 
@@ -183,7 +185,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean {
      *
      * @param connBufFlushFreq Flush frequency.
      * @see #getConnectionBufferSize()
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Sets connection buffer flush frequency.")
     public void setConnectionBufferFlushFrequency(long connBufFlushFreq);
 
@@ -193,7 +197,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean {
      * If set to {@code 0} connection buffer is disabled.
      *
      * @return Connection buffer size.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Connection buffer size.")
     public int getConnectionBufferSize();
 
@@ -238,7 +244,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean {
      * prior to sending.
      *
      * @return Minimum buffered message count.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Minimum buffered message count.")
     public int getMinimumBufferedMessageCount();