You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/28 10:57:33 UTC

[1/3] ignite git commit: ignite-1.5 Added node attributes in AuthenticationContext.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 5fa5f861e -> 94218a818


ignite-1.5 Added node attributes in AuthenticationContext.


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

Branch: refs/heads/ignite-1537
Commit: 939a170d9d27822b0ed19b019ecf8c76142c544d
Parents: 18c413c
Author: sboikov <sb...@gridgain.com>
Authored: Mon Dec 28 12:10:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Dec 28 12:10:53 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |  7 +++--
 .../ignite/internal/IgniteNodeAttributes.java   |  3 ++
 .../processors/rest/GridRestProcessor.java      |  4 +++
 .../rest/client/message/GridClientNodeBean.java |  4 +--
 .../plugin/security/AuthenticationContext.java  | 33 +++++++++++++++++---
 5 files changed, 42 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/939a170d/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 6e0be10..14b5816 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -788,7 +788,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
             startProcessor(new ClusterProcessor(ctx));
 
-            fillNodeAttributes();
+            fillNodeAttributes(notifyEnabled);
 
             U.onGridStart();
 
@@ -1201,10 +1201,11 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
     /**
      * Creates attributes map and fills it in.
      *
+     * @param notifyEnabled Update notifier flag.
      * @throws IgniteCheckedException thrown if was unable to set up attribute.
      */
     @SuppressWarnings({"SuspiciousMethodCalls", "unchecked", "TypeMayBeWeakened"})
-    private void fillNodeAttributes() throws IgniteCheckedException {
+    private void fillNodeAttributes(boolean notifyEnabled) throws IgniteCheckedException {
         final String[] incProps = cfg.getIncludeProperties();
 
         try {
@@ -1242,6 +1243,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                 }
             }
 
+            ctx.addNodeAttribute(IgniteNodeAttributes.ATTR_UPDATE_NOTIFIER_ENABLED, notifyEnabled);
+
             if (log.isDebugEnabled())
                 log.debug("Added system properties to node attributes.");
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/939a170d/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
index ba04403..3c5f960 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNodeAttributes.java
@@ -144,6 +144,9 @@ public final class IgniteNodeAttributes {
     /** Binary protocol version. */
     public static final String ATTR_BINARY_PROTO_VER = ATTR_PREFIX + ".binary.proto.ver";
 
+    /** Update notifier enabled. */
+    public static final String ATTR_UPDATE_NOTIFIER_ENABLED = ATTR_PREFIX + ".update.notifier.enabled";
+
     /**
      * Enforces singleton.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/939a170d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index 4bb02c4..e839443 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -22,6 +22,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.List;
@@ -656,6 +657,7 @@ public class GridRestProcessor extends GridProcessorAdapter {
 
         authCtx.subjectType(REMOTE_CLIENT);
         authCtx.subjectId(req.clientId());
+        authCtx.nodeAttributes(Collections.<String, Object>emptyMap());
 
         SecurityCredentials cred;
 
@@ -884,11 +886,13 @@ public class GridRestProcessor extends GridProcessorAdapter {
 
         /** Session token id. */
         private final UUID sesId;
+
         /**
          * Time when session is used last time.
          * If this time was set at TIMEDOUT_FLAG, then it should never be changed.
          */
         private final AtomicLong lastTouchTime = new AtomicLong(U.currentTimeMillis());
+
         /** Security context. */
         private volatile SecurityContext secCtx;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/939a170d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
index 8ba6eb5..ca82608 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
@@ -233,8 +233,8 @@ public class GridClientNodeBean implements Externalizable {
             for (GridClientCacheBean cacheBean : caches) {
                 if (cacheBean.getName() == null)
                     dfltCacheMode = cacheBean.getMode().toString();
-                else
-                    cacheMap.put(cacheBean.getName(), cacheBean.getMode().toString());
+
+                cacheMap.put(cacheBean.getName(), cacheBean.getMode().toString());
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/939a170d/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
index 16e282d..91f3379 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/security/AuthenticationContext.java
@@ -18,6 +18,8 @@
 package org.apache.ignite.plugin.security;
 
 import java.net.InetSocketAddress;
+import java.util.Collections;
+import java.util.Map;
 import java.util.UUID;
 
 /**
@@ -31,11 +33,14 @@ public class AuthenticationContext {
     private UUID subjId;
 
     /** Credentials. */
-    private SecurityCredentials credentials;
+    private SecurityCredentials creds;
 
     /** Subject address. */
     private InetSocketAddress addr;
 
+    /** */
+    private Map<String, Object> nodeAttrs;
+
     /**
      * Gets subject type.
      *
@@ -78,16 +83,16 @@ public class AuthenticationContext {
      * @return Security credentials.
      */
     public SecurityCredentials credentials() {
-        return credentials;
+        return creds;
     }
 
     /**
      * Sets security credentials.
      *
-     * @param credentials Security credentials.
+     * @param creds Security credentials.
      */
-    public void credentials(SecurityCredentials credentials) {
-        this.credentials = credentials;
+    public void credentials(SecurityCredentials creds) {
+        this.creds = creds;
     }
 
     /**
@@ -107,4 +112,22 @@ public class AuthenticationContext {
     public void address(InetSocketAddress addr) {
         this.addr = addr;
     }
+
+    /**
+     * Gets node attributes.
+     *
+     * @return Node attributes or empty map for {@link SecuritySubjectType#REMOTE_CLIENT}.
+     */
+    public Map<String, Object> nodeAttributes() {
+        return nodeAttrs != null ? nodeAttrs : Collections.<String, Object>emptyMap();
+    }
+
+    /**
+     * Sets node attributes.
+     *
+     * @param nodeAttrs Node attributes.
+     */
+    public void nodeAttributes(Map<String, Object> nodeAttrs) {
+        this.nodeAttrs = nodeAttrs;
+    }
 }
\ No newline at end of file


[3/3] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537


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

Branch: refs/heads/ignite-1537
Commit: 94218a8183c3c64fb763057d93870ba7da775c1d
Parents: 5fa5f86 dd0a8d3
Author: sboikov <sb...@gridgain.com>
Authored: Mon Dec 28 12:56:58 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Dec 28 12:56:58 2015 +0300

----------------------------------------------------------------------
 assembly/release-sources.xml                    | 79 ++++++++++++++++++++
 modules/clients/pom.xml                         |  2 +-
 .../apache/ignite/internal/IgniteKernal.java    |  7 +-
 .../ignite/internal/IgniteNodeAttributes.java   |  3 +
 .../processors/rest/GridRestProcessor.java      |  4 +
 .../rest/client/message/GridClientNodeBean.java |  4 +-
 .../plugin/security/AuthenticationContext.java  | 33 ++++++--
 pom.xml                                         | 23 +++---
 8 files changed, 135 insertions(+), 20 deletions(-)
----------------------------------------------------------------------



[2/3] ignite git commit: release-sources & dotnet doc fix

Posted by sb...@apache.org.
release-sources & dotnet doc fix


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

Branch: refs/heads/ignite-1537
Commit: dd0a8d3acc2696db3404f7708bf27e34c7456b07
Parents: 939a170
Author: Anton Vinogradov <av...@apache.org>
Authored: Mon Dec 28 12:39:04 2015 +0300
Committer: Anton Vinogradov <av...@apache.org>
Committed: Mon Dec 28 12:39:04 2015 +0300

----------------------------------------------------------------------
 assembly/release-sources.xml | 79 +++++++++++++++++++++++++++++++++++++++
 modules/clients/pom.xml      |  2 +-
 pom.xml                      | 23 +++++++-----
 3 files changed, 93 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dd0a8d3a/assembly/release-sources.xml
----------------------------------------------------------------------
diff --git a/assembly/release-sources.xml b/assembly/release-sources.xml
new file mode 100644
index 0000000..96e54f9
--- /dev/null
+++ b/assembly/release-sources.xml
@@ -0,0 +1,79 @@
+<?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.
+-->
+
+<assembly>
+    <id>source-release</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+
+    <fileSets>
+        <!-- main project directory structure -->
+        <fileSet>
+            <directory>.</directory>
+            <outputDirectory>/</outputDirectory>
+            <useDefaultExcludes>true</useDefaultExcludes>
+            <excludes>
+                <!-- build output -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
+
+                <!-- NOTE: Most of the following excludes should not be required
+                     if the standard release process is followed. This is because the
+                     release plugin checks out project sources into a location like
+                     target/checkout, then runs the build from there. The result is
+                     a source-release archive that comes from a pretty clean directory
+                     structure.
+
+                     HOWEVER, if the release plugin is configured to run extra goals
+                     or generate a project website, it's definitely possible that some
+                     of these files will be present. So, it's safer to exclude them.
+                -->
+
+                <!-- IDEs -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude>
+
+                <!-- misc -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude>
+
+                <!-- release-plugin temp files -->
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
+                <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
+
+                <!-- dotnet assemblies -->
+                <exclude>modules/platforms/dotnet/bin/**</exclude>
+            </excludes>
+        </fileSet>
+        <!-- license, readme, etc. calculated at build time -->
+        <fileSet>
+            <directory>${project.build.directory}/maven-shared-archive-resources/META-INF</directory>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd0a8d3a/modules/clients/pom.xml
----------------------------------------------------------------------
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 1f4555f..faef4a4 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -142,7 +142,7 @@
             <id>docs</id>
             <activation>
                 <property>
-                    <name>!skipClientDocs</name>
+                    <name>clientDocs</name>
                 </property>
             </activation>
             <build>

http://git-wip-us.apache.org/repos/asf/ignite/blob/dd0a8d3a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4bdad1e..3457c30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -476,25 +476,28 @@
                 <plugins>
                     <plugin>
                         <artifactId>maven-assembly-plugin</artifactId>
-                        <dependencies>
-                            <dependency>
-                                <groupId>org.apache.apache.resources</groupId>
-                                <artifactId>apache-source-release-assembly-descriptor</artifactId>
-                                <version>1.0.4</version>
-                            </dependency>
-                        </dependencies>
                         <executions>
                             <execution>
+                                <!-- skip default -->
                                 <id>source-release-assembly</id>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <configuration>
+                                    <skipAssembly>true</skipAssembly>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>source-release-assembly-ignite</id>
                                 <phase>package</phase>
                                 <goals>
                                     <goal>single</goal>
                                 </goals>
                                 <configuration>
                                     <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
-                                    <descriptorRefs>
-                                        <descriptorRef>${sourceReleaseAssemblyDescriptor}</descriptorRef>
-                                    </descriptorRefs>
+                                    <descriptors>
+                                        <descriptor>assembly/release-sources.xml</descriptor>
+                                    </descriptors>
                                     <tarLongFileMode>gnu</tarLongFileMode>
                                     <finalName>${project.artifactId}-${project.version}-src</finalName>
                                     <appendAssemblyId>false</appendAssemblyId>