ignite-5075

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

Branch: refs/heads/ignite-5075
Commit: 31b027f8080d90fdc2063ed7d15878d5ad95d9bc
Parents: a1d4104 090b440
Author: sboikov <sboi...@gridgain.com>
Authored: Thu May 4 15:04:07 2017 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Thu May 4 15:04:07 2017 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |   5 +-
 modules/aop/pom.xml                             |   2 +-
 modules/apache-license-gen/pom.xml              |   2 +-
 modules/aws/pom.xml                             |   2 +-
 modules/benchmarks/pom.xml                      |   2 +-
 modules/camel/pom.xml                           |   2 +-
 modules/cassandra/pom.xml                       |   2 +-
 modules/cassandra/serializers/pom.xml           |   4 +-
 modules/cassandra/store/pom.xml                 |   4 +-
 modules/clients/pom.xml                         |   2 +-
 modules/cloud/pom.xml                           |   2 +-
 modules/codegen/pom.xml                         |   2 +-
 modules/core/pom.xml                            |   2 +-
 .../cache/CacheAffinitySharedManager.java       |  17 +-
 .../processors/cache/ClusterCachesInfo.java     | 204 ++++-
 .../cache/DynamicCacheChangeRequest.java        |  24 +-
 .../cache/DynamicCacheDescriptor.java           | 104 +--
 .../processors/cache/ExchangeActions.java       |   6 +
 .../processors/cache/GridCacheIoManager.java    |  15 +-
 .../processors/cache/GridCacheProcessor.java    | 176 +---
 .../IgniteCacheDatabaseSharedManager.java       |  21 +-
 .../cache/database/tree/BPlusTree.java          |   6 +-
 .../dht/GridDhtAffinityAssignmentRequest.java   |  36 +-
 .../dht/GridDhtAssignmentFetchFuture.java       |  17 +-
 .../GridDhtAtomicAbstractUpdateRequest.java     |  17 +
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  |   7 +-
 .../GridDhtPartitionsExchangeFuture.java        |  17 +-
 .../continuous/CacheContinuousQueryManager.java |  12 +-
 .../cluster/GridClusterStateProcessor.java      |   4 +-
 .../processors/security/SecurityContext.java    |   9 +
 .../service/GridServiceProcessor.java           |  11 +
 .../security/SecurityBasicPermissionSet.java    |  96 ++-
 .../plugin/security/SecurityPermission.java     |  13 +-
 .../plugin/security/SecurityPermissionSet.java  |   8 +
 .../security/SecurityPermissionSetBuilder.java  |  36 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |   2 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |   4 +-
 .../core/src/main/resources/ignite.properties   |   2 +-
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  |   3 +-
 .../GridCacheAbstractLocalStoreSelfTest.java    |  41 +-
 ...niteTopologyValidatorGridSplitCacheTest.java |   8 +-
 .../IgniteCrossCacheTxStoreSelfTest.java        |  13 +-
 .../processors/database/BPlusTreeSelfTest.java  |  75 ++
 .../database/IgniteDbDynamicCacheSelfTest.java  |   1 +
 .../database/MetadataStorageSelfTest.java       |   3 +-
 .../processors/igfs/IgfsSizeSelfTest.java       |   2 +-
 .../SecurityPermissionSetBuilderTest.java       |  83 +-
 .../junits/spi/GridSpiAbstractTest.java         |   5 +
 modules/extdata/p2p/pom.xml                     |   2 +-
 .../extdata/uri/modules/uri-dependency/pom.xml  |   2 +-
 modules/extdata/uri/pom.xml                     |   2 +-
 modules/flink/pom.xml                           |   2 +-
 modules/flume/pom.xml                           |   2 +-
 modules/gce/pom.xml                             |   2 +-
 modules/geospatial/pom.xml                      |   2 +-
 modules/hadoop/pom.xml                          |   2 +-
 modules/hibernate-4.2/pom.xml                   |   2 +-
 modules/hibernate-5.1/pom.xml                   |   2 +-
 modules/hibernate-core/pom.xml                  |  10 +-
 modules/indexing/pom.xml                        |   2 +-
 ...teCacheJoinPartitionedAndReplicatedTest.java |  57 +-
 modules/jcl/pom.xml                             |   2 +-
 modules/jms11/pom.xml                           |   2 +-
 modules/jta/pom.xml                             |   2 +-
 modules/kafka/pom.xml                           |   2 +-
 modules/kubernetes/pom.xml                      |   2 +-
 modules/log4j/pom.xml                           |   2 +-
 modules/log4j2/pom.xml                          |   2 +-
 modules/mesos/pom.xml                           |   2 +-
 .../apache/ignite/mesos/IgniteFramework.java    | 111 ++-
 .../ignite/mesos/IgniteSchedulerSelfTest.java   |  39 +-
 modules/ml/pom.xml                              |   6 +-
 .../org/apache/ignite/ml/math/Precision.java    | 588 ++++++++++++++
 .../java/org/apache/ignite/ml/math/Tracer.java  |  22 +-
 .../decompositions/CholeskyDecomposition.java   |   6 +-
 .../math/decompositions/EigenDecomposition.java |   6 +-
 .../ml/math/decompositions/LUDecomposition.java |   9 +-
 .../ml/math/decompositions/QRDecomposition.java |  70 +-
 .../SingularValueDecomposition.java             |   5 +-
 .../math/exceptions/CardinalityException.java   |   6 +-
 .../exceptions/InsufficientDataException.java   |  44 +
 .../exceptions/MathArithmeticException.java     |  47 ++
 .../MathIllegalArgumentException.java           |  37 +
 .../math/exceptions/MathRuntimeException.java   |  47 ++
 .../ml/math/exceptions/NoDataException.java     |  45 +
 .../NonPositiveDefiniteMatrixException.java     |   8 +-
 .../exceptions/NonSquareMatrixException.java    |  33 +
 .../math/exceptions/NullArgumentException.java  |  27 +
 .../exceptions/SingularMatrixException.java     |   9 +-
 .../ignite/ml/math/functions/Functions.java     |   5 +
 .../apache/ignite/ml/math/impls/CacheUtils.java | 111 ++-
 .../ml/math/impls/matrix/AbstractMatrix.java    |   5 +
 .../impls/matrix/DenseLocalOffHeapMatrix.java   |   5 -
 .../impls/matrix/SparseDistributedMatrix.java   |  16 +-
 .../matrix/SparseDistributedMatrixStorage.java  |  89 +-
 .../math/impls/vector/SingleElementVector.java  | 103 ++-
 .../apache/ignite/ml/math/util/MatrixUtil.java  | 121 +++
 .../AbstractMultipleLinearRegression.java       | 358 ++++++++
 .../regressions/MultipleLinearRegression.java   |  71 ++
 .../OLSMultipleLinearRegression.java            | 272 +++++++
 .../regressions/RegressionsErrorMessages.java   |  28 +
 .../ignite/ml/regressions/package-info.java     |  22 +
 .../java/org/apache/ignite/ml/TestUtils.java    | 248 ++++++
 .../apache/ignite/ml/math/ExternalizeTest.java  |   1 +
 .../ignite/ml/math/MathImplLocalTestSuite.java  |   7 +-
 .../ignite/ml/math/MathImplMainTestSuite.java   |   5 +-
 .../CholeskyDecompositionTest.java              |   6 +-
 .../decompositions/LUDecompositionTest.java     |   6 +-
 .../decompositions/QRDecompositionTest.java     |   6 +-
 .../SingularValueDecompositionTest.java         |   6 +-
 .../matrix/SparseDistributedMatrixTest.java     |  67 +-
 .../AbstractMultipleLinearRegressionTest.java   | 164 ++++
 .../OLSMultipleLinearRegressionTest.java        | 812 +++++++++++++++++++
 modules/mqtt/pom.xml                            |   2 +-
 modules/osgi-karaf/pom.xml                      |   2 +-
 modules/osgi-paxlogging/pom.xml                 |   2 +-
 modules/osgi/pom.xml                            |   2 +-
 modules/platforms/cpp/common/configure.ac       |   2 +-
 .../platforms/cpp/common/include/Makefile.am    |   5 +-
 .../cpp/common/include/ignite/common/promise.h  | 201 +++++
 .../common/include/ignite/common/shared_state.h | 331 ++++++++
 .../cpp/common/include/ignite/future.h          | 236 ++++++
 .../cpp/common/include/ignite/ignite_error.h    |   3 +
 .../linux/include/ignite/common/concurrent_os.h | 234 +++++-
 .../win/include/ignite/common/concurrent_os.h   | 169 +++-
 .../common/os/win/src/common/concurrent_os.cpp  |  26 +-
 .../cpp/common/project/vs/common.vcxproj        |   3 +
 .../common/project/vs/common.vcxproj.filters    |   9 +
 modules/platforms/cpp/configure.ac              |   2 +-
 modules/platforms/cpp/configure.acrel           |   2 +-
 modules/platforms/cpp/core-test/Makefile.am     |   1 +
 modules/platforms/cpp/core-test/configure.ac    |   2 +-
 .../cpp/core-test/project/vs/core-test.vcxproj  |   1 +
 .../project/vs/core-test.vcxproj.filters        |   4 +
 .../cpp/core-test/src/concurrent_test.cpp       |  47 ++
 .../platforms/cpp/core-test/src/future_test.cpp | 474 +++++++++++
 modules/platforms/cpp/core/configure.ac         |   2 +-
 modules/platforms/cpp/examples/configure.ac     |   2 +-
 .../putget-example/config/example-cache.xml     |  10 +-
 .../project/vs/putget-example.vcxproj           |   3 +
 .../project/vs/putget-example.vcxproj.filters   |   8 +
 .../putget-example/src/putget_example.cpp       |   2 +-
 .../project/vs/query-example.vcxproj            |   3 +
 .../project/vs/query-example.vcxproj.filters    |   8 +
 modules/platforms/cpp/ignite/configure.ac       |   2 +-
 .../cpp/odbc/install/ignite-odbc-amd64.wxs      |   2 +-
 .../cpp/odbc/install/ignite-odbc-x86.wxs        |   2 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Compute/BinarizableClosureTaskTest.cs       |  10 +-
 .../Compute/ComputeApiTest.cs                   |  26 +
 .../Compute/FailoverTaskSelfTest.cs             |  46 +-
 .../Compute/IgniteExceptionTaskSelfTest.cs      | 105 +--
 .../Compute/SerializableClosureTaskTest.cs      |  30 +-
 .../Log/CustomLoggerTest.cs                     |   3 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Compute/ComputeTaskAdapter.cs               |   4 +-
 .../Closure/ComputeAbstractClosureTask.cs       |   3 +-
 .../Apache.Ignite.Core/Impl/Compute/Compute.cs  |  17 +
 .../Impl/Compute/ComputeJobHolder.cs            |   3 +-
 .../Impl/Compute/ComputeTaskHolder.cs           |   8 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Apache.Ignite/Properties/AssemblyInfo.cs    |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 .../Properties/AssemblyInfo.cs                  |   6 +-
 modules/rest-http/pom.xml                       |   2 +-
 modules/rocketmq/pom.xml                        |   2 +-
 modules/scalar-2.10/pom.xml                     |   2 +-
 modules/scalar/pom.xml                          |   2 +-
 modules/schedule/pom.xml                        |   2 +-
 modules/slf4j/pom.xml                           |   2 +-
 modules/spark-2.10/pom.xml                      |   2 +-
 modules/spark/pom.xml                           |   2 +-
 modules/spring-data/pom.xml                     |   5 +-
 modules/spring/pom.xml                          |   2 +-
 modules/ssh/pom.xml                             |   2 +-
 modules/storm/pom.xml                           |   2 +-
 modules/tools/pom.xml                           |   2 +-
 modules/twitter/pom.xml                         |   2 +-
 modules/urideploy/pom.xml                       |   2 +-
 modules/visor-console-2.10/pom.xml              |   2 +-
 modules/visor-console/pom.xml                   |   2 +-
 modules/visor-plugins/pom.xml                   |   2 +-
 .../web-console/backend/app/browsersHandler.js  |   6 +-
 modules/web-console/frontend/app/app.config.js  |   4 +-
 modules/web-console/frontend/app/app.js         |   8 +-
 .../cluster-select/cluster-select.pug           |   3 +-
 .../frontend/app/filters/byName.filter.js       |   4 +-
 .../app/filters/domainsValidation.filter.js     |   4 +-
 .../frontend/app/filters/duration.filter.js     |   4 +-
 .../frontend/app/filters/hasPojo.filter.js      |   4 +-
 .../app/helpers/jade/form/form-field-text.pug   |  55 +-
 .../frontend/app/helpers/jade/mixins.pug        |  20 +-
 .../app/modules/agent/AgentManager.service.js   |  73 +-
 .../generator/Properties.service.js             |  63 +-
 .../frontend/app/modules/demo/Demo.module.js    |   2 +-
 .../frontend/app/modules/sql/sql.controller.js  |  10 +-
 .../configuration/summary/summary.controller.js |   2 +-
 .../frontend/controllers/domains-controller.js  |   2 +-
 .../frontend/test/karma.conf.babel.js           |   6 +
 modules/web-console/pom.xml                     |   2 +-
 modules/web-console/web-agent/pom.xml           |   2 +-
 .../console/agent/handlers/ClusterListener.java |   2 +-
 .../console/agent/handlers/DemoListener.java    |   2 +-
 .../ignite/console/agent/rest/RestExecutor.java |   2 +-
 modules/web/ignite-appserver-test/pom.xml       |   2 +-
 modules/web/ignite-websphere-test/pom.xml       |   2 +-
 modules/web/pom.xml                             |   2 +-
 modules/yardstick/pom.xml                       |   2 +-
 modules/yarn/pom.xml                            |   2 +-
 modules/zeromq/pom.xml                          |   2 +-
 modules/zookeeper/pom.xml                       |   2 +-
 pom.xml                                         |  11 +-
 221 files changed, 6438 insertions(+), 990 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
index 507d6e8,8c275e0..80aeef4
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
@@@ -824,10 -832,10 +824,10 @@@ public class CacheAffinitySharedManager
              });
          }
          else {
 -            forAllCaches(false, new 
IgniteInClosureX<GridAffinityAssignmentCache>() {
 +            forAllCacheGroups(false, new 
IgniteInClosureX<GridAffinityAssignmentCache>() {
                  @Override public void applyx(GridAffinityAssignmentCache aff) 
throws IgniteCheckedException {
                      if 
(aff.lastVersion().equals(AffinityTopologyVersion.NONE))
-                         initAffinity(aff, fut, false);
+                         initAffinity(registeredCaches.get(aff.cacheId()), 
aff, fut, false);
                  }
              });
          }
@@@ -839,7 -847,10 +839,10 @@@
       * @param fetch Force fetch flag.
       * @throws IgniteCheckedException If failed.
       */
-     private void initAffinity(GridAffinityAssignmentCache aff, 
GridDhtPartitionsExchangeFuture fut, boolean fetch)
 -    private void initAffinity(DynamicCacheDescriptor desc,
++    private void initAffinity(CacheGroupDescriptor grpDesc,
+         GridAffinityAssignmentCache aff,
+         GridDhtPartitionsExchangeFuture fut,
+         boolean fetch)
          throws IgniteCheckedException {
          if (!fetch && canCalculateAffinity(aff, fut)) {
              List<List<ClusterNode>> assignment = 
aff.calculate(fut.topologyVersion(), fut.discoveryEvent(), fut.discoCache());
@@@ -848,7 -859,7 +851,7 @@@
          }
          else {
              GridDhtAssignmentFetchFuture fetchFut = new 
GridDhtAssignmentFetchFuture(cctx,
-                 aff.groupId(),
 -                desc,
++                grpDesc,
                  fut.topologyVersion(),
                  fut.discoCache());
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index c1cde6e,059c8ac..bd1e27f
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@@ -542,10 -622,9 +661,10 @@@ class ClusterCachesInfo 
          for (DynamicCacheDescriptor desc : registeredTemplates.values()) {
              CacheData cacheData = new CacheData(desc.cacheConfiguration(),
                  0,
 +                0,
                  desc.cacheType(),
                  desc.startTopologyVersion(),
-                 null,
+                 desc.deploymentId(),
                  desc.schema(),
                  desc.receivedFrom(),
                  desc.staticallyConfigured(),

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
index ee0c522,fe859f8..a86410b
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
@@@ -117,12 -101,16 +105,18 @@@ public class DynamicCacheDescriptor 
          IgniteUuid deploymentId,
          QuerySchema schema) {
          assert cacheCfg != null;
 +        assert grpDesc != null || template;
          assert schema != null;
  
+         if (cacheCfg.getCacheMode() == CacheMode.REPLICATED && 
cacheCfg.getNearConfiguration() != null) {
+             cacheCfg = new CacheConfiguration(cacheCfg);
+ 
+             cacheCfg.setNearConfiguration(null);
+         }
+ 
          this.cacheCfg = cacheCfg;
          this.cacheType = cacheType;
 +        this.grpDesc = grpDesc;
          this.template = template;
          this.deploymentId = deploymentId;
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeActions.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
----------------------------------------------------------------------
diff --cc 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
index 7c63c50,1d6563e..c8966ed
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtAssignmentFetchFuture.java
@@@ -32,6 -32,7 +32,8 @@@ import org.apache.ignite.internal.GridN
  import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
  import org.apache.ignite.internal.managers.discovery.DiscoCache;
  import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
++import org.apache.ignite.internal.processors.cache.CacheGroupDescriptor;
+ import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
  import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
  import org.apache.ignite.internal.util.future.GridFutureAdapter;
  import org.apache.ignite.internal.util.tostring.GridToStringInclude;
@@@ -68,21 -68,26 +69,26 @@@ public class GridDhtAssignmentFetchFutu
      @GridToStringInclude
      private final T2<Integer, AffinityTopologyVersion> key;
  
+     /** */
 -    private final DynamicCacheDescriptor cacheDesc;
++    private final CacheGroupDescriptor grpDesc;
+ 
      /**
       * @param ctx Context.
 -     * @param cacheDesc Cache descriptor.
++     * @param grpDesc Group descriptor.
       * @param topVer Topology version.
       * @param discoCache Discovery cache.
       */
      public GridDhtAssignmentFetchFuture(
          GridCacheSharedContext ctx,
-         int grpId,
 -        DynamicCacheDescriptor cacheDesc,
++        CacheGroupDescriptor grpDesc,
          AffinityTopologyVersion topVer,
          DiscoCache discoCache
      ) {
          this.ctx = ctx;
-         this.key = new T2<>(grpId, topVer);
 -        this.cacheDesc = cacheDesc;
 -        this.key = new T2<>(cacheDesc.cacheId(), topVer);
++        this.grpDesc = grpDesc;
++        this.key = new T2<>(grpDesc.groupId(), topVer);
  
-         Collection<ClusterNode> availableNodes = 
discoCache.cacheGroupAffinityNodes(grpId);
 -        Collection<ClusterNode> availableNodes = 
discoCache.cacheAffinityNodes(cacheDesc.cacheId());
++        Collection<ClusterNode> availableNodes = 
discoCache.cacheGroupAffinityNodes(grpDesc.groupId());
  
          LinkedList<ClusterNode> tmp = new LinkedList<>();
  
@@@ -183,7 -188,8 +189,8 @@@
                          log0.debug("Sending affinity fetch request to remote 
node [locNodeId=" + ctx.localNodeId() +
                              ", node=" + node + ']');
  
-                     ctx.io().send(node, new 
GridDhtAffinityAssignmentRequest(key.get1(), key.get2()),
+                     ctx.io().send(node,
 -                        new GridDhtAffinityAssignmentRequest(key.get1(), 
key.get2(), cacheDesc.startTopologyVersion()),
++                        new GridDhtAffinityAssignmentRequest(key.get1(), 
key.get2(), grpDesc.startTopologyVersion()),
                          AFFINITY_POOL);
  
                      // Close window for listener notification.

http://git-wip-us.apache.org/repos/asf/ignite/blob/31b027f8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------

Reply via email to