ignite git commit: IGNITE-6625: SSL support for thin JDBC: additional fix test; change error message

2018-02-09 Thread isapego
Repository: ignite
Updated Branches:
  refs/heads/master 7c0145299 -> 64c9f502a


IGNITE-6625: SSL support for thin JDBC: additional fix test; change error 
message


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

Branch: refs/heads/master
Commit: 64c9f502a6c893aefffe82b27aa50ee275265953
Parents: 7c01452
Author: tledkov-gridgain 
Authored: Fri Feb 9 14:08:15 2018 +0300
Committer: Igor Sapego 
Committed: Fri Feb 9 14:10:08 2018 +0300

--
 .../client/ClientConnectorConfigurationValidationSelfTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/64c9f502/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
index 141f444..0729f77 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
@@ -334,7 +334,7 @@ public class ClientConnectorConfigurationValidationSelfTest 
extends GridCommonAb
 
 return null;
 }
-}, SQLException.class, "Failed to connect to Ignite cluster");
+}, SQLException.class, "JDBC connection is not allowed, see 
ClientConnectorConfiguration.jdbcEnabled");
 }
 
 /**



[1/2] ignite git commit: IGNITE-7438: LSQR solver for Linear Regression

2018-02-09 Thread chief
Repository: ignite
Updated Branches:
  refs/heads/master 64c9f502a -> 2f330a1cd


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f330a1c/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
--
diff --git 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
new file mode 100644
index 000..4892ff8
--- /dev/null
+++ 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ml.math.isolve.lsqr;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.ml.dataset.DatasetBuilder;
+import org.apache.ignite.ml.dataset.impl.local.LocalDatasetBuilder;
+import org.apache.ignite.ml.math.isolve.LinSysPartitionDataBuilderOnHeap;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertArrayEquals;
+
+/**
+ * Tests for {@link LSQROnHeap}.
+ */
+@RunWith(Parameterized.class)
+public class LSQROnHeapTest {
+/** Parameters. */
+@Parameterized.Parameters(name = "Data divided on {0} partitions")
+public static Iterable data() {
+return Arrays.asList(
+new Integer[] {1},
+new Integer[] {2},
+new Integer[] {3},
+new Integer[] {5},
+new Integer[] {7},
+new Integer[] {100},
+new Integer[] {1000}
+);
+}
+
+/** Number of partitions. */
+@Parameterized.Parameter
+public int parts;
+
+/** Tests solving simple linear system. */
+@Test
+public void testSolveLinearSystem() {
+Map data = new HashMap<>();
+data.put(0, new double[]{3, 2, -1, 1});
+data.put(1, new double[]{2, -2, 4, -2});
+data.put(2, new double[]{-1, 0.5, -1, 0});
+
+DatasetBuilder datasetBuilder = new 
LocalDatasetBuilder<>(data, parts);
+
+LSQROnHeap lsqr = new LSQROnHeap<>(
+datasetBuilder,
+new LinSysPartitionDataBuilderOnHeap<>(
+(k, v) -> Arrays.copyOf(v, v.length - 1),
+(k, v) -> v[3],
+3
+)
+);
+
+LSQRResult res = lsqr.solve(0, 1e-12, 1e-12, 1e8, -1, false, null);
+
+assertArrayEquals(new double[]{1, -2, -2}, res.getX(), 1e-6);
+}
+
+/** Tests solving simple linear system with specified x0. */
+@Test
+public void testSolveLinearSystemWithX0() {
+Map data = new HashMap<>();
+data.put(0, new double[]{3, 2, -1, 1});
+data.put(1, new double[]{2, -2, 4, -2});
+data.put(2, new double[]{-1, 0.5, -1, 0});
+
+DatasetBuilder datasetBuilder = new 
LocalDatasetBuilder<>(data, parts);
+
+LSQROnHeap lsqr = new LSQROnHeap<>(
+datasetBuilder,
+new LinSysPartitionDataBuilderOnHeap<>(
+(k, v) -> Arrays.copyOf(v, v.length - 1),
+(k, v) -> v[3],
+3
+)
+);
+
+LSQRResult res = lsqr.solve(0, 1e-12, 1e-12, 1e8, -1, false,
+new double[] {999, 999, 999});
+
+assertArrayEquals(new double[]{1, -2, -2}, res.getX(), 1e-6);
+}
+
+/** Tests solving least squares problem. */
+@Test
+public void testSolveLeastSquares() throws Exception {
+Map data = new HashMap<>();
+data.put(0, new double[] {-1.0915526, 1.81983527, -0.91409478, 
0.70890712, -24.55724107});
+data.put(1, new double[] {-0.61072904, 0.37545517, 0.21705352, 
0.09516495, -26.57226867});
+data.put(2, new double[] {0.05485406, 0.88219898, -0.80584547, 
0.94668307, 61.80919728});
+data.put(3, new double[] {-0.24835094, -0.3453, -1.69984651, 
-1.45902635, -161.65525991});
+data.put(4, new double[] {0.63675392, 0.31675535, 0.38837437, 
-1.1221971, -14.46432611});
+data.put(5, new double[] {0.14194017, 2.18158997, -0.28397346, 
-0.62090588, -3.2122197});
+data.put(

[2/2] ignite git commit: IGNITE-7438: LSQR solver for Linear Regression

2018-02-09 Thread chief
IGNITE-7438: LSQR solver for Linear Regression

this closes #3494


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

Branch: refs/heads/master
Commit: 2f330a1cd1430a198ac0ddd81075ef20ff1e7316
Parents: 64c9f50
Author: dmitrievanthony 
Authored: Fri Feb 9 14:17:27 2018 +0300
Committer: Yury Babak 
Committed: Fri Feb 9 14:17:27 2018 +0300

--
 ...tedLinearRegressionExampleWithQRTrainer.java | 136 
 ...edLinearRegressionExampleWithSGDTrainer.java | 137 
 ...dLinearRegressionWithLSQRTrainerExample.java | 170 ++
 ...tedLinearRegressionWithQRTrainerExample.java | 136 
 ...edLinearRegressionWithSGDTrainerExample.java | 137 
 .../org/apache/ignite/ml/DatasetTrainer.java|  42 +++
 .../main/java/org/apache/ignite/ml/Trainer.java |   2 +
 .../ml/math/isolve/IterativeSolverResult.java   |  64 
 .../LinSysPartitionDataBuilderOnHeap.java   |  85 +
 .../math/isolve/LinSysPartitionDataOnHeap.java  |  75 +
 .../ml/math/isolve/lsqr/AbstractLSQR.java   | 333 +++
 .../ignite/ml/math/isolve/lsqr/LSQROnHeap.java  | 102 ++
 .../math/isolve/lsqr/LSQRPartitionContext.java  |  41 +++
 .../ignite/ml/math/isolve/lsqr/LSQRResult.java  | 140 
 .../ml/math/isolve/lsqr/package-info.java   |  22 ++
 .../ignite/ml/math/isolve/package-info.java |  22 ++
 .../linear/LinearRegressionLSQRTrainer.java |  70 
 .../org/apache/ignite/ml/trainers/Trainer.java  |   2 +
 .../ignite/ml/math/MathImplLocalTestSuite.java  |   4 +-
 .../ml/math/isolve/lsqr/LSQROnHeapTest.java | 134 
 .../ml/regressions/RegressionsTestSuite.java|   4 +-
 .../linear/LinearRegressionLSQRTrainerTest.java | 124 +++
 22 files changed, 1707 insertions(+), 275 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f330a1c/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
deleted file mode 100644
index 98ff2a2..000
--- 
a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.ml.regression.linear;
-
-import java.util.Arrays;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.Ignition;
-import 
org.apache.ignite.examples.ml.math.matrix.SparseDistributedMatrixExample;
-import org.apache.ignite.ml.Trainer;
-import org.apache.ignite.ml.math.Matrix;
-import org.apache.ignite.ml.math.Vector;
-import org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix;
-import org.apache.ignite.ml.math.impls.vector.SparseDistributedVector;
-import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
-import org.apache.ignite.ml.regressions.linear.LinearRegressionQRTrainer;
-import org.apache.ignite.thread.IgniteThread;
-
-/**
- * Run linear regression model over distributed matrix.
- *
- * @see LinearRegressionQRTrainer
- */
-public class DistributedLinearRegressionExampleWithQRTrainer {
-/** */
-private static final double[][] data = {
-{8, 78, 284, 9.10381, 109},
-{9.30191, 68, 433, 8.69809, 144},
-{7.5, 70, 739, 7.19809, 113},
-{8.89619, 96, 1792, 8.89619, 97},
-{10.1981, 74, 477, 8.30191, 206},
-{8.30191, 111, 362, 10.8962, 124},
-{8.80191, 77, 671, 10, 152},
-{8.80191, 168, 636, 9.10381, 162},
-{10.6981, 82,

[01/50] [abbrv] ignite git commit: IGNITE-7475 Improved VerifyBackupPartitionsTask to calculate partition hashes in parallel - Fixes #3407.

2018-02-09 Thread akuznetsov
Repository: ignite
Updated Branches:
  refs/heads/ignite-7485-2 138ff50fd -> 234488ede


IGNITE-7475 Improved VerifyBackupPartitionsTask to calculate partition hashes 
in parallel - Fixes #3407.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/ignite-7485-2
Commit: 53c0fd1e44cda1972e29c8d256edb808c0368dde
Parents: aca9732
Author: Ivan Rakov 
Authored: Wed Jan 31 12:51:09 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Jan 31 12:51:09 2018 +0300

--
 .../verify/VerifyBackupPartitionsTask.java  | 157 ++-
 1 file changed, 118 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/53c0fd1e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTask.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTask.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTask.java
index 23aa0e1..b884cb0 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTask.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/VerifyBackupPartitionsTask.java
@@ -19,13 +19,22 @@ package org.apache.ignite.internal.processors.cache.verify;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteInterruptedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.compute.ComputeJob;
@@ -162,6 +171,9 @@ public class VerifyBackupPartitionsTask extends 
ComputeTaskAdapter,
 /** Cache names. */
 private Set cacheNames;
 
+/** Counter of processed partitions. */
+private final AtomicInteger completionCntr = new AtomicInteger(0);
+
 /**
  * @param names Names.
  */
@@ -208,7 +220,9 @@ public class VerifyBackupPartitionsTask extends 
ComputeTaskAdapter,
 }
 }
 
-Map res = new HashMap<>();
+List>> 
partHashCalcFutures = new ArrayList<>();
+
+completionCntr.set(0);
 
 for (Integer grpId : grpIds) {
 CacheGroupContext grpCtx = 
ignite.context().cache().cacheGroup(grpId);
@@ -218,62 +232,127 @@ public class VerifyBackupPartitionsTask extends 
ComputeTaskAdapter,
 
 List parts = 
grpCtx.topology().localPartitions();
 
-for (GridDhtLocalPartition part : parts) {
-if (!part.reserve())
-continue;
+for (GridDhtLocalPartition part : parts)
+
partHashCalcFutures.add(calculatePartitionHashAsync(grpCtx, part));
+}
 
-int partHash = 0;
-long partSize;
-long updateCntrBefore;
+Map res = new HashMap<>();
 
-try {
-if (part.state() != GridDhtPartitionState.OWNING)
-continue;
+long lastProgressLogTs = U.currentTimeMillis();
 
-updateCntrBefore = part.updateCounter();
+for (int i = 0; i < partHashCalcFutures.size(); ) {
+Future> fut = 
partHashCalcFutures.get(i);
 
-partSize = part.dataStore().fullSize();
+try {
+Map partHash = 
fut.get(10, TimeUnit.SECONDS);
 
-GridIterator it = 
grpCtx.offheap().partitionIterator(part.id());
+res.putAll(partHash);
 
-while (it.hasNextX()) {
-CacheDataRow row = it.nextX();
+i++;
+}
+catch (InterruptedException | ExecutionException e) {
+for (int j = i + 1; j < partHashCalcFutures.size(); 

[45/50] [abbrv] ignite git commit: IGNITE-7464 - Add property to configure time between node connection attempts - Fixes #3493

2018-02-09 Thread akuznetsov
IGNITE-7464 - Add property to configure time between node connection attempts - 
Fixes #3493

Signed-off-by: Valentin Kulichenko 


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

Branch: refs/heads/ignite-7485-2
Commit: 4abcb31071c6518d9692f1a3ecb443068ce548a4
Parents: b2f8cf8
Author: Stanislav Lukyanov 
Authored: Thu Feb 8 14:25:11 2018 -0800
Committer: Valentin Kulichenko 
Committed: Thu Feb 8 14:25:11 2018 -0800

--
 .../ignite/spi/discovery/tcp/ClientImpl.java|  21 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java|   4 +-
 .../spi/discovery/tcp/TcpDiscoveryImpl.java |   7 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java  |  36 +-
 .../tcp/TcpDiscoverySpiReconnectDelayTest.java  | 446 +++
 .../IgniteSpiDiscoverySelfTestSuite.java|   3 +
 6 files changed, 499 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/4abcb310/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 c9a4a5a..a8f13fa 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
@@ -505,9 +505,10 @@ class ClientImpl extends TcpDiscoveryImpl {
 "Please check IP finder configuration" +
 (spi.ipFinder instanceof 
TcpDiscoveryMulticastIpFinder ?
 " and make sure multicast works on your 
network. " : ". ") +
-"Will retry every 2 secs.", true);
+"Will retry every " + spi.getReconnectDelay() + " 
ms. " +
+"Change 'reconnectDelay' to configure the 
frequency of retries.", true);
 
-Thread.sleep(2000);
+Thread.sleep(spi.getReconnectDelay());
 }
 }
 
@@ -566,23 +567,21 @@ class ClientImpl extends TcpDiscoveryImpl {
 }
 }
 
-if (wait) {
-if (timeout > 0 && (U.currentTimeMillis() - startTime) > 
timeout)
-return null;
+if (timeout > 0 && (U.currentTimeMillis() - startTime) > timeout)
+return null;
 
+if (wait) {
 if (log.isDebugEnabled())
 log.debug("Will wait before retry join.");
 
-Thread.sleep(2000);
+Thread.sleep(spi.getReconnectDelay());
 }
 else if (addrs.isEmpty()) {
-if (timeout > 0 && (U.currentTimeMillis() - startTime) > 
timeout)
-return null;
-
 LT.warn(log, "Failed to connect to any address from IP finder 
(will retry to join topology " +
-"every 2 secs): " + toOrderedList(addrs0), true);
+"every " + spi.getReconnectDelay() + " ms; change 
'reconnectDelay' to configure the frequency " +
+"of retries): " + toOrderedList(addrs0), true);
 
-Thread.sleep(2000);
+Thread.sleep(spi.getReconnectDelay());
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4abcb310/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 6f79720..743964a 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
@@ -1091,7 +1091,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 log.debug("Concurrent discovery SPI start has been 
detected (local node should wait).");
 
 try {
-U.sleep(2000);
+U.sleep(spi.getReconnectDelay());
 }
 catch (IgniteInterruptedCheckedException e) {
 throw new IgniteSpiException("Thread has been 
interrupted.", e);
@@ -1125,7 +1125,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 }
 
 try {
-U.sleep(2000);
+U.sleep(spi.getReconnectD

[23/50] [abbrv] ignite git commit: IGNITE-5779 - Fixes #3471.

2018-02-09 Thread akuznetsov
IGNITE-5779 - Fixes #3471.

Signed-off-by: Igor Rudyak 


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

Branch: refs/heads/ignite-7485-2
Commit: 08f96597660e57e8b558d57387b1bba3c3889902
Parents: 54bac75
Author: Igor Rudyak 
Authored: Sun Feb 4 22:06:47 2018 -0800
Committer: Igor Rudyak 
Committed: Sun Feb 4 22:06:47 2018 -0800

--
 .../cache/store/cassandra/CassandraCacheStore.java  |  3 ++-
 .../store/cassandra/common/PropertyMappingHelper.java   |  7 +++
 .../store/cassandra/session/CassandraSessionImpl.java   |  3 +--
 .../org/apache/ignite/tests/load/PersonGenerator.java   |  2 +-
 .../test/java/org/apache/ignite/tests/pojos/Person.java | 12 ++--
 .../org/apache/ignite/tests/pojos/SimplePerson.java |  8 
 .../java/org/apache/ignite/tests/utils/TestsHelper.java |  4 ++--
 7 files changed, 19 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/08f96597/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java
--
diff --git 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java
 
b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java
index b438946..b223cb3 100644
--- 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java
+++ 
b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java
@@ -272,7 +272,8 @@ public class CassandraCacheStore implements 
CacheStore {
 
 /** {@inheritDoc} */
 @Override protected void process(Row row) {
-data.put((K)controller.buildKeyObject(row), 
(V)controller.buildValueObject(row));
+if (row != null)
+data.put((K)controller.buildKeyObject(row), 
(V)controller.buildValueObject(row));
 }
 }, keys);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/08f96597/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/common/PropertyMappingHelper.java
--
diff --git 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/common/PropertyMappingHelper.java
 
b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/common/PropertyMappingHelper.java
index 66d7294..ed9f054 100644
--- 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/common/PropertyMappingHelper.java
+++ 
b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/common/PropertyMappingHelper.java
@@ -46,8 +46,8 @@ public class PropertyMappingHelper {
 put(String.class, DataType.Name.TEXT);
 put(Integer.class, DataType.Name.INT);
 put(int.class, DataType.Name.INT);
-put(Short.class, DataType.Name.INT);
-put(short.class, DataType.Name.INT);
+put(Short.class, DataType.Name.SMALLINT);
+put(short.class, DataType.Name.SMALLINT);
 put(Long.class, DataType.Name.BIGINT);
 put(long.class, DataType.Name.BIGINT);
 put(Double.class, DataType.Name.DOUBLE);
@@ -129,7 +129,7 @@ public class PropertyMappingHelper {
 return row.getInt(col);
 
 if (Short.class.equals(clazz) || short.class.equals(clazz))
-return (short)row.getInt(col);
+return row.getShort(col);
 
 if (Long.class.equals(clazz) || long.class.equals(clazz))
 return row.getLong(col);
@@ -148,7 +148,6 @@ public class PropertyMappingHelper {
 
 if (PropertyMappingHelper.BYTES_ARRAY_CLASS.equals(clazz)) {
 ByteBuffer buf = row.getBytes(col);
-
 return buf == null ? null : buf.array();
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/08f96597/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
--
diff --git 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
 
b/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
index 819120a..4fb0cb2 100644
--- 
a/modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/session/CassandraSessionImpl.java
+++ 
b/modules/cassandra/store/src/main/java/org/apache/igni

[03/50] [abbrv] ignite git commit: IGNITE-7500 Optimizing tests

2018-02-09 Thread akuznetsov
IGNITE-7500 Optimizing tests


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

Branch: refs/heads/ignite-7485-2
Commit: e74519fb4236c089d18d71f6491c97a00efa3a7b
Parents: 8a5446f
Author: Alexey Goncharuk 
Authored: Wed Jan 31 16:42:31 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Jan 31 16:42:31 2018 +0300

--
 ...idCacheRebalancingPartitionCountersTest.java | 32 +++-
 1 file changed, 17 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/e74519fb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
index 0676c45..a02890e 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java
@@ -29,6 +29,7 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.WALMode;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
@@ -52,17 +53,18 @@ public class GridCacheRebalancingPartitionCountersTest 
extends GridCommonAbstrac
 return super.getConfiguration(igniteInstanceName)
 .setConsistentId(igniteInstanceName)
 .setDataStorageConfiguration(
-new DataStorageConfiguration()
-.setCheckpointFrequency(3_000)
-.setDefaultDataRegionConfiguration(
-new DataRegionConfiguration()
-.setPersistenceEnabled(true)
-.setMaxSize(100L * 1024 * 
1024)))
+new DataStorageConfiguration()
+.setCheckpointFrequency(3_000)
+.setDefaultDataRegionConfiguration(
+new DataRegionConfiguration()
+.setPersistenceEnabled(true)
+.setMaxSize(100L * 1024 * 1024))
+.setWalMode(WALMode.LOG_ONLY))
 .setCacheConfiguration(new CacheConfiguration(CACHE_NAME)
-.setBackups(2)
-.setRebalanceBatchSize(4096) // Force to create 
several supply messages during rebalancing.
-.setAffinity(
-new RendezvousAffinityFunction(false, 
PARTITIONS_CNT)));
+.setBackups(2)
+.setRebalanceBatchSize(4096) // Force to create several 
supply messages during rebalancing.
+.setAffinity(
+new RendezvousAffinityFunction(false, 
PARTITIONS_CNT)));
 }
 
 /** {@inheritDoc} */
@@ -94,9 +96,9 @@ public class GridCacheRebalancingPartitionCountersTest 
extends GridCommonAbstrac
 public void test() throws Exception {
 IgniteEx ignite = (IgniteEx)startGrids(3);
 
-ignite.active(true);
+ignite.cluster().active(true);
 
-IgniteCache cache = ignite.cache(CACHE_NAME);
+IgniteCache cache = ignite.cache(CACHE_NAME);
 
 for (int i = 0; i < 256; i++)
 cache.put(i, i);
@@ -106,7 +108,7 @@ public class GridCacheRebalancingPartitionCountersTest 
extends GridCommonAbstrac
 IgniteEx node = (IgniteEx) ignite(problemNode);
 int[] primaryPartitions = 
node.affinity(CACHE_NAME).primaryPartitions(node.cluster().localNode());
 
-ignite.active(false);
+ignite.cluster().active(false);
 
 boolean primaryRemoved = false;
 for (int i = 0; i < PARTITIONS_CNT; i++) {
@@ -128,7 +130,7 @@ public class GridCacheRebalancingPartitionCountersTest 
extends GridCommonAbstrac
 

[26/50] [abbrv] ignite git commit: IGNITE-7317: SVM Examples

2018-02-09 Thread akuznetsov
IGNITE-7317: SVM Examples

this closes #3435


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

Branch: refs/heads/ignite-7485-2
Commit: a1922d7e2406da7bfe561b838f01d98aeae1e1f1
Parents: 8b52ae9
Author: zaleslaw 
Authored: Mon Feb 5 18:08:45 2018 +0300
Committer: Yury Babak 
Committed: Mon Feb 5 18:08:45 2018 +0300

--
 .../ml/svm/SVMBinaryClassificationExample.java  |  134 ++
 .../src/main/resources/datasets/titanic.txt | 1309 ++
 2 files changed, 1443 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/a1922d7e/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
new file mode 100644
index 000..979afe2
--- /dev/null
+++ 
b/examples/src/main/java/org/apache/ignite/examples/ml/svm/SVMBinaryClassificationExample.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.examples.ml.svm;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.Ignition;
+import org.apache.ignite.examples.ExampleNodeStartup;
+import org.apache.ignite.internal.util.IgniteUtils;
+import org.apache.ignite.ml.Trainer;
+import org.apache.ignite.ml.structures.LabeledDataset;
+import org.apache.ignite.ml.structures.LabeledDatasetTestTrainPair;
+import org.apache.ignite.ml.structures.preprocessing.LabeledDatasetLoader;
+import org.apache.ignite.ml.structures.preprocessing.LabellingMachine;
+import org.apache.ignite.ml.structures.preprocessing.Normalizer;
+import org.apache.ignite.ml.svm.SVMLinearBinaryClassificationTrainer;
+import org.apache.ignite.ml.svm.SVMLinearClassificationModel;
+import org.apache.ignite.thread.IgniteThread;
+
+/**
+ * 
+ * Example of using {@link 
org.apache.ignite.ml.svm.SVMLinearClassificationModel} with Titanic dataset.
+ * 
+ * Note that in this example we cannot guarantee order in which nodes return 
results of intermediate
+ * computations and therefore algorithm can return different results.
+ * 
+ * Remote nodes should always be started with special configuration file which
+ * enables P2P class loading: {@code 'ignite.{sh|bat} 
examples/config/example-ignite.xml'}.
+ * 
+ * Alternatively you can run {@link ExampleNodeStartup} in another JVM which 
will start node
+ * with {@code examples/config/example-ignite.xml} configuration.
+ */
+public class SVMBinaryClassificationExample {
+/** Separator. */
+private static final String SEPARATOR = ",";
+
+/** Path to the Iris dataset. */
+private static final String TITANIC_DATASET = 
"examples/src/main/resources/datasets/titanic.txt";
+
+/**
+ * Executes example.
+ *
+ * @param args Command line arguments, none required.
+ */
+public static void main(String[] args) throws InterruptedException {
+System.out.println(">>> SVM Binary classification example started.");
+// Start ignite grid.
+try (Ignite ignite = 
Ignition.start("examples/config/example-ignite.xml")) {
+System.out.println(">>> Ignite grid started.");
+
+IgniteThread igniteThread = new 
IgniteThread(ignite.configuration().getIgniteInstanceName(),
+SVMBinaryClassificationExample.class.getSimpleName(), () -> {
+
+try {
+// Prepare path to read
+File file = IgniteUtils.resolveIgnitePath(TITANIC_DATASET);
+if (file == null)
+throw new RuntimeE

[19/50] [abbrv] ignite git commit: .NET: Update README regarding C++ interop and thin client

2018-02-09 Thread akuznetsov
.NET: Update README regarding C++ interop and thin client


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

Branch: refs/heads/ignite-7485-2
Commit: eee4f17b1ad8edbb8cfaf7ba7902c30a83a236d0
Parents: 71db707
Author: Pavel Tupitsyn 
Authored: Fri Feb 2 15:01:27 2018 +0300
Committer: Pavel Tupitsyn 
Committed: Fri Feb 2 15:01:27 2018 +0300

--
 modules/platforms/dotnet/README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/eee4f17b/modules/platforms/dotnet/README.md
--
diff --git a/modules/platforms/dotnet/README.md 
b/modules/platforms/dotnet/README.md
index f1cb989..4830940 100644
--- a/modules/platforms/dotnet/README.md
+++ b/modules/platforms/dotnet/README.md
@@ -75,11 +75,13 @@ Ignite is an elastic, horizontally scalable distributed 
system that supports add
 ## Ignite and Ignite.NET
 
 * Ignite.NET is built on top of Ignite.
-* .NET starts the JVM in the same process and communicates with it via JNI & 
C++.
+* .NET starts the JVM in the same process and communicates with it via JNI.
 * .NET, C++ and Java nodes can join the same cluster, use the same caches, and 
interoperate using common binary protocol.
 * Java compute jobs can execute on any node (Java, .NET, C++).
 * .NET compute jobs can only execute on .NET nodes.
 
+Ignite.NET also has Thin Client mode (see `Ignition.StartClient()`), which 
does not start JVM and does not require Java on machine.
+
 ## Ignite Components
 
 You can view Apache Ignite as a collection of independent, well-integrated 
components geared to improve performance and



[06/50] [abbrv] ignite git commit: IGNITE-7473 .NET: Fix ConfigurationManager assembly error on Linux

2018-02-09 Thread akuznetsov
IGNITE-7473 .NET: Fix ConfigurationManager assembly error on Linux


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

Branch: refs/heads/ignite-7485-2
Commit: 0088405ce305a915174c53bcafcc9a1740da64c7
Parents: af8cb62
Author: Pavel Tupitsyn 
Authored: Wed Jan 31 19:49:07 2018 +0300
Committer: Pavel Tupitsyn 
Committed: Wed Jan 31 19:49:07 2018 +0300

--
 modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/0088405c/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
--
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index 20d6dc3..5b93609 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -193,7 +193,7 @@ namespace Apache.Ignite.Core
 /// Gets the configuration section.
 /// 
 private static T GetConfigurationSection(string sectionName, string 
configPath)
-where T : ConfigurationSection
+where T : class
 {
 IgniteArgumentCheck.NotNullOrEmpty(sectionName, "sectionName");
 IgniteArgumentCheck.NotNullOrEmpty(configPath, "configPath");



[32/50] [abbrv] ignite git commit: IGNITE-7514 Affinity assignment should be recalculated when primary node is not OWNER

2018-02-09 Thread akuznetsov
IGNITE-7514 Affinity assignment should be recalculated when primary node is not 
OWNER


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

Branch: refs/heads/ignite-7485-2
Commit: faf50f1dad74028f6cd665ec23ee3dabc40ea923
Parents: 7b37f64
Author: Ilya Lantukh 
Authored: Wed Feb 7 13:33:28 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Feb 7 13:33:28 2018 +0300

--
 .../internal/events/DiscoveryCustomEvent.java   |  34 
 .../cache/CacheAffinitySharedManager.java   |  86 +++---
 .../processors/cache/ClusterCachesInfo.java |   1 +
 .../GridCachePartitionExchangeManager.java  |   2 +-
 .../dht/GridClientPartitionTopology.java|   9 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   3 -
 .../dht/GridDhtPartitionTopology.java   |  10 +-
 .../dht/GridDhtPartitionTopologyImpl.java   |  47 +-
 .../GridDhtPartitionsExchangeFuture.java| 144 ++--
 .../GridCacheDatabaseSharedManager.java |   5 +
 .../distributed/CacheBaselineTopologyTest.java  | 169 ++-
 11 files changed, 424 insertions(+), 86 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/faf50f1d/modules/core/src/main/java/org/apache/ignite/internal/events/DiscoveryCustomEvent.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/events/DiscoveryCustomEvent.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/events/DiscoveryCustomEvent.java
index b3c6a2d..3b12b38 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/events/DiscoveryCustomEvent.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/events/DiscoveryCustomEvent.java
@@ -21,7 +21,10 @@ import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import 
org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotDiscoveryMessage;
+import org.apache.ignite.internal.processors.cluster.ChangeGlobalStateMessage;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Custom event.
@@ -85,4 +88,35 @@ public class DiscoveryCustomEvent extends DiscoveryEvent {
 @Override public String toString() {
 return S.toString(DiscoveryCustomEvent.class, this, super.toString());
 }
+
+/**
+ * @param evt Discovery event.
+ * @return {@code True} if event is DiscoveryCustomEvent that requires 
centralized affinity assignment.
+ */
+public static boolean requiresCentralizedAffinityAssignment(DiscoveryEvent 
evt) {
+if (!(evt instanceof DiscoveryCustomEvent))
+return false;
+
+return 
requiresCentralizedAffinityAssignment(((DiscoveryCustomEvent)evt).customMessage());
+}
+
+/**
+ * @param msg Discovery custom message.
+ * @return {@code True} if message belongs to event that requires 
centralized affinity assignment.
+ */
+public static boolean requiresCentralizedAffinityAssignment(@Nullable 
DiscoveryCustomMessage msg) {
+if (msg == null)
+return false;
+
+if (msg instanceof ChangeGlobalStateMessage && 
((ChangeGlobalStateMessage)msg).activate())
+return true;
+
+if (msg instanceof SnapshotDiscoveryMessage) {
+SnapshotDiscoveryMessage snapMsg = (SnapshotDiscoveryMessage) msg;
+
+return snapMsg.needExchange() && snapMsg.needAssignPartitions();
+}
+
+return false;
+}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/faf50f1d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
--
diff --git 
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
index 4119f23..7bf793c 100644
--- 
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
@@ -40,6 +40,7 @@ import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import 
org.apache.ignite

[20/50] [abbrv] ignite git commit: IGNITE-7437: Partition based dataset implementation

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/54bac750/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationPreprocessor.java
--
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationPreprocessor.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationPreprocessor.java
new file mode 100644
index 000..7c94b8f
--- /dev/null
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationPreprocessor.java
@@ -0,0 +1,88 @@
+/*
+ * 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.ml.preprocessing.normalization;
+
+import org.apache.ignite.ml.math.functions.IgniteBiFunction;
+
+/**
+ * Preprocessing function that makes normalization. From mathematical point of 
view it's the following function which
+ * is applied to every element in dataset:
+ *
+ * {@code a_i = (a_i - min_i) / (max_i - min_i) for all i},
+ *
+ * where {@code i} is a number of column, {@code max_i} is the value of the 
maximum element in this columns,
+ * {@code min_i} is the value of the minimal element in this column.
+ *
+ * @param  Type of a key in {@code upstream} data.
+ * @param  Type of a value in {@code upstream} data.
+ */
+public class NormalizationPreprocessor implements IgniteBiFunction {
+/** */
+private static final long serialVersionUID = 6997800576392623469L;
+
+/** Minimal values. */
+private final double[] min;
+
+/** Maximum values. */
+private final double[] max;
+
+/** Base preprocessor. */
+private final IgniteBiFunction basePreprocessor;
+
+/**
+ * Constructs a new instance of normalization preprocessor.
+ *
+ * @param min Minimal values.
+ * @param max Maximum values.
+ * @param basePreprocessor Base preprocessor.
+ */
+public NormalizationPreprocessor(double[] min, double[] max, 
IgniteBiFunction basePreprocessor) {
+this.min = min;
+this.max = max;
+this.basePreprocessor = basePreprocessor;
+}
+
+/**
+ * Applies this preprocessor.
+ *
+ * @param k Key.
+ * @param v Value.
+ * @return Preprocessed row.
+ */
+@Override public double[] apply(K k, V v) {
+double[] res = basePreprocessor.apply(k, v);
+
+assert res.length == min.length;
+assert res.length == max.length;
+
+for (int i = 0; i < res.length; i++)
+res[i] = (res[i] - min[i]) / (max[i] - min[i]);
+
+return res;
+}
+
+/** */
+public double[] getMin() {
+return min;
+}
+
+/** */
+public double[] getMax() {
+return max;
+}
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/54bac750/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainer.java
--
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainer.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainer.java
new file mode 100644
index 000..16623ba
--- /dev/null
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/normalization/NormalizationTrainer.java
@@ -0,0 +1,90 @@
+/*
+ * 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.
+ */
+

[15/50] [abbrv] ignite git commit: IGNITE-7389 DataStreamer hangs if exception was thrown during addData which isn't IgniteException

2018-02-09 Thread akuznetsov
IGNITE-7389 DataStreamer hangs if exception was thrown during addData which 
isn't IgniteException

Signed-off-by: Anton Vinogradov 


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

Branch: refs/heads/ignite-7485-2
Commit: 283ab0c423c67cc85576cb05c37b2d7be39b088a
Parents: d88af9b
Author: ilantukh 
Authored: Thu Feb 1 18:42:42 2018 +0300
Committer: Anton Vinogradov 
Committed: Thu Feb 1 18:42:42 2018 +0300

--
 .../cache/DynamicCacheDescriptor.java   |  2 +-
 .../datastreamer/DataStreamerImpl.java  | 43 +---
 .../datastreamer/DataStreamerImplSelfTest.java  | 22 --
 3 files changed, 49 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/283ab0c4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/DynamicCacheDescriptor.java
--
diff --git 
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
index 18abcd8..4771c3e 100644
--- 
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
@@ -286,7 +286,7 @@ public class DynamicCacheDescriptor {
 
 
 /**
- * @return Start topology version.
+ * @return Start topology version or {@code null} if cache configured 
statically.
  */
 @Nullable public AffinityTopologyVersion startTopologyVersion() {
 return startTopVer;

http://git-wip-us.apache.org/repos/asf/ignite/blob/283ab0c4/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index c71d129..7d6a8d3 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -73,6 +73,7 @@ import 
org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
+import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
@@ -81,7 +82,6 @@ import 
org.apache.ignite.internal.processors.cache.GridCacheGateway;
 import org.apache.ignite.internal.processors.cache.GridCacheUtils;
 import org.apache.ignite.internal.processors.cache.IgniteCacheFutureImpl;
 import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
-import 
org.apache.ignite.internal.processors.cache.IgniteFinishedCacheFutureImpl;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartitionException;
 import 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
@@ -365,6 +365,8 @@ public class DataStreamerImpl implements 
IgniteDataStreamer, Delayed
 
 ctx.grid().getOrCreateCache(ccfg);
 }
+
+ensureCacheStarted();
 }
 
 /**
@@ -589,9 +591,6 @@ public class DataStreamerImpl implements 
IgniteDataStreamer, Delayed
 catch (IgniteDataStreamerTimeoutException e) {
 throw e;
 }
-catch (IgniteException e) {
-return new IgniteFinishedCacheFutureImpl<>(e);
-}
 finally {
 leaveBusy();
 }
@@ -670,16 +669,8 @@ public class DataStreamerImpl implements 
IgniteDataStreamer, Delayed
 else
 checkSecurityPermission(SecurityPermission.CACHE_PUT);
 
-KeyCacheObject key0;
-CacheObject val0;
-
-try {
-key0 = cacheObjProc.toCacheKeyObject(cacheObjCtx, null, key, true);
-val0 = cacheObjProc.toCacheObject(cacheObjCtx, val, true);
-}
-catch (Exception e) {
-return new IgniteFinishedCacheFutureImpl<

[46/50] [abbrv] ignite git commit: IGNITE-7337: Implementation of saving DataFrame to Ignite SQL tables - Fixes #3438.

2018-02-09 Thread akuznetsov
IGNITE-7337: Implementation of saving DataFrame to Ignite SQL tables - Fixes 
#3438.

Signed-off-by: Nikolay Izhikov 


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

Branch: refs/heads/ignite-7485-2
Commit: 7c01452990ad0de0fb84ab4c0424a6d71e5bccba
Parents: 4abcb31
Author: Nikolay Izhikov 
Authored: Fri Feb 9 07:00:54 2018 +0300
Committer: Nikolay Izhikov 
Committed: Fri Feb 9 07:00:54 2018 +0300

--
 examples/src/main/resources/person.json |  10 +
 .../spark/IgniteDataFrameWriteExample.scala | 179 +
 .../spark/examples/IgniteDataFrameSelfTest.java |   9 +
 .../ignite/spark/IgniteDataFrameSettings.scala  | 100 +
 .../spark/impl/IgniteRelationProvider.scala | 175 -
 .../ignite/spark/impl/IgniteSQLRelation.scala   |  93 ++---
 .../apache/ignite/spark/impl/QueryHelper.scala  | 186 ++
 .../apache/ignite/spark/impl/QueryUtils.scala   | 225 +++
 .../org/apache/ignite/spark/impl/package.scala  |   2 +-
 .../sql/ignite/IgniteExternalCatalog.scala  |  61 ++-
 .../src/test/resources/cities_non_unique.json   |   6 +
 .../ignite/spark/AbstractDataFrameSpec.scala|  41 +-
 .../apache/ignite/spark/IgniteCatalogSpec.scala |  10 +-
 .../ignite/spark/IgniteDataFrameSuite.scala |   2 +
 .../spark/IgniteDataFrameWrongConfigSpec.scala  |   4 +-
 ...niteSQLDataFrameIgniteSessionWriteSpec.scala | 106 ++
 .../spark/IgniteSQLDataFrameWriteSpec.scala | 371 +++
 17 files changed, 1462 insertions(+), 118 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/7c014529/examples/src/main/resources/person.json
--
diff --git a/examples/src/main/resources/person.json 
b/examples/src/main/resources/person.json
new file mode 100644
index 000..d651b0d
--- /dev/null
+++ b/examples/src/main/resources/person.json
@@ -0,0 +1,10 @@
+{ "id": 1, "name": "Ivan Ivanov", "department": "Executive commitee" }
+{ "id": 2, "name": "Petr Petrov", "department": "Executive commitee" }
+{ "id": 3, "name": "Jonh Doe", "department": "Production" }
+{ "id": 4, "name": "Smith Ann", "department": "Production" }
+{ "id": 5, "name": "Sergey Smirnov", "department": "Accounting" }
+{ "id": 6, "name": "Alexandra Sergeeva", "department": "Accounting" }
+{ "id": 7, "name": "Adam West", "department": "IT" }
+{ "id": 8, "name": "Beverley Chase", "department": "Head Office" }
+{ "id": 9, "name": "Igor Rozhkov", "department": "Head Office" }
+{ "id": 10, "name": "Anastasia Borisova", "department": "IT" }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7c014529/examples/src/main/spark/org/apache/ignite/examples/spark/IgniteDataFrameWriteExample.scala
--
diff --git 
a/examples/src/main/spark/org/apache/ignite/examples/spark/IgniteDataFrameWriteExample.scala
 
b/examples/src/main/spark/org/apache/ignite/examples/spark/IgniteDataFrameWriteExample.scala
new file mode 100644
index 000..7662fb4
--- /dev/null
+++ 
b/examples/src/main/spark/org/apache/ignite/examples/spark/IgniteDataFrameWriteExample.scala
@@ -0,0 +1,179 @@
+/*
+ * 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.examples.spark
+
+import java.lang.{Long ⇒ JLong, String ⇒ JString}
+
+import org.apache.ignite.cache.query.SqlFieldsQuery
+import org.apache.ignite.configuration.CacheConfiguration
+import org.apache.ignite.{Ignite, Ignition}
+import org.apache.log4j.{Level, Logger}
+import org.apache.spark.sql.{SaveMode, SparkSession}
+import org.apache.ignite.spark.IgniteDataFrameSettings._
+import org.apache.spark.sql.functions._
+
+import scala.collection.JavaConversions._
+
+/**
+  * Example application showing use-case for writing Spark DataFrame API to 
Ignite.
+  */
+object IgniteDataFrameWriteExample extends App {
+/**
+  * Ignite config 

[25/50] [abbrv] ignite git commit: IGNITE-7625 Fix links for Javadoc

2018-02-09 Thread akuznetsov
IGNITE-7625 Fix links for Javadoc

Signed-off-by: Anton Vinogradov 


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

Branch: refs/heads/ignite-7485-2
Commit: 8b52ae94e49e8d6616aa8f6aba694b62557598aa
Parents: cfad55d
Author: Ivanov Petr 
Authored: Mon Feb 5 16:58:26 2018 +0300
Committer: Anton Vinogradov 
Committed: Mon Feb 5 16:58:26 2018 +0300

--
 .../src/main/java/org/apache/ignite/logger/java/JavaLogger.java| 2 +-
 parent/pom.xml | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/8b52ae94/modules/core/src/main/java/org/apache/ignite/logger/java/JavaLogger.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/logger/java/JavaLogger.java 
b/modules/core/src/main/java/org/apache/ignite/logger/java/JavaLogger.java
index 78d3afa..a6c132d 100644
--- a/modules/core/src/main/java/org/apache/ignite/logger/java/JavaLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/logger/java/JavaLogger.java
@@ -88,7 +88,7 @@ import static 
org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
  *  ...
  *  cfg.setGridLogger(log);
  * 
- * Please take a look at http://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html";>Logger
 javadoc
+ * Please take a look at {@link java.util.logging.Logger} javadoc
  * for additional information.
  * 
  * It's recommended to use Ignite logger injection instead of 
using/instantiating

http://git-wip-us.apache.org/repos/asf/ignite/blob/8b52ae94/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 0d6729e..ba5d576 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -311,7 +311,6 @@
 false
 ${javadoc.opts}
 
-
http://docs.oracle.com/javase/7/docs/api/
 
http://hadoop.apache.org/docs/current/api/
 
 



[28/50] [abbrv] ignite git commit: IGNITE-6721: PDS & non PDS test fix, limiting persistent region size. - Fixes #3475.

2018-02-09 Thread akuznetsov
IGNITE-6721: PDS & non PDS test fix, limiting persistent region size. - Fixes 
#3475.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/ignite-7485-2
Commit: e8bd98dbaa1bb12e086f09b135b0d087df73769e
Parents: 50213a0
Author: dpavlov 
Authored: Tue Feb 6 22:14:12 2018 +0300
Committer: Alexey Goncharuk 
Committed: Tue Feb 6 22:14:12 2018 +0300

--
 .../PageEvictionMultinodeMixedRegionsTest.java  |  5 ++--
 .../ignite/testsuites/IgnitePdsTestSuite2.java  | 27 ++--
 2 files changed, 22 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/e8bd98db/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeMixedRegionsTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeMixedRegionsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeMixedRegionsTest.java
index 1015e52..dc3d018 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeMixedRegionsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeMixedRegionsTest.java
@@ -23,7 +23,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
 
 /**
- *
+ * Enables but not touches persistent region, checks page eviction and PDS+no 
PDS mode.
  */
 public class PageEvictionMultinodeMixedRegionsTest extends 
PageEvictionMultinodeTest {
 /** {@inheritDoc} */
@@ -34,7 +34,8 @@ public class PageEvictionMultinodeMixedRegionsTest extends 
PageEvictionMultinode
 
 DataRegionConfiguration persReg = new DataRegionConfiguration()
 .setName("persisted")
-.setPersistenceEnabled(true);
+.setPersistenceEnabled(true)
+.setMaxSize(128 * 1024 * 1024); // limit memory to save space on 
agents
 
 cfg.getDataStorageConfiguration().setDataRegionConfigurations(persReg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/e8bd98db/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
index a3dc5a1..5aca92f 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePdsTestSuite2.java
@@ -60,6 +60,8 @@ public class IgnitePdsTestSuite2 extends TestSuite {
 
 addRealPageStoreTests(suite);
 
+addRealPageStoreTestsLongRunning(suite);
+
 // BaselineTopology tests
 suite.addTestSuite(IgniteAllBaselineNodesOnlineFullApiSelfTest.class);
 suite.addTestSuite(IgniteOfflineBaselineNodeFullApiSelfTest.class);
@@ -69,6 +71,23 @@ public class IgnitePdsTestSuite2 extends TestSuite {
 }
 
 /**
+ * Fills {@code suite} with PDS test subset, which operates with real page 
store, but requires long time to execute.
+ *
+ * @param suite suite to add tests into.
+ */
+public static void addRealPageStoreTestsLongRunning(TestSuite suite) {
+suite.addTestSuite(IgnitePdsTransactionsHangTest.class);
+
+
suite.addTestSuite(IgnitePdsPageEvictionDuringPartitionClearTest.class);
+
+// Rebalancing test
+suite.addTestSuite(IgnitePdsContinuousRestartTest.class);
+suite.addTestSuite(IgnitePdsContinuousRestartTest2.class);
+
+
suite.addTestSuite(IgnitePdsContinuousRestartTestWithSharedGroupAndIndexes.class);
+}
+
+/**
  * Fills {@code suite} with PDS test subset, which operates with real page 
store and does actual disk operations.
  *
  * @param suite suite to add tests into.
@@ -81,22 +100,14 @@ public class IgnitePdsTestSuite2 extends TestSuite {
 // Metrics test.
 suite.addTestSuite(IgniteDataStorageMetricsSelfTest.class);
 
-suite.addTestSuite(IgnitePdsTransactionsHangTest.class);
-
 suite.addTestSuite(IgnitePdsRebalancingOnNotStableTopologyTest.class);
 
 suite.addTestSuite(IgnitePdsWholeClusterRestartTest.class);
 
-
suite.addTestSuite(IgnitePdsPageEvictionDuringPartitionClearTest.class);
 
 

[42/50] [abbrv] ignite git commit: IGNITE-6625: JDBC thin: support SSL connection to Ignite node

2018-02-09 Thread akuznetsov
IGNITE-6625: JDBC thin: support SSL connection to Ignite node

This closes #3233


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

Branch: refs/heads/ignite-7485-2
Commit: 42161cdd5eafb6403aa6ed4beb75d2645f16f944
Parents: a83f303
Author: tledkov-gridgain 
Authored: Thu Feb 8 15:29:42 2018 +0300
Committer: Igor Sapego 
Committed: Thu Feb 8 15:31:29 2018 +0300

--
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |   2 +
 .../jdbc/thin/JdbcThinConnectionSSLTest.java| 479 +++
 .../jdbc/thin/JdbcThinConnectionSelfTest.java   |  36 +-
 .../jdbc/thin/JdbcThinErrorsSelfTest.java   |   2 +-
 .../jdbc/thin/ConnectionProperties.java | 206 
 .../jdbc/thin/ConnectionPropertiesImpl.java | 232 -
 .../internal/jdbc/thin/JdbcThinConnection.java  |   5 +
 .../internal/jdbc/thin/JdbcThinSSLUtil.java | 332 +
 .../internal/jdbc/thin/JdbcThinTcpIo.java   |  43 +-
 9 files changed, 1297 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/42161cdd/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
--
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
index 656e218..c004817 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java
@@ -43,6 +43,7 @@ import 
org.apache.ignite.jdbc.thin.JdbcThinBulkLoadTransactionalPartitionedSelfT
 import 
org.apache.ignite.jdbc.thin.JdbcThinBulkLoadTransactionalReplicatedSelfTest;
 import org.apache.ignite.jdbc.thin.JdbcThinComplexDmlDdlSelfTest;
 import org.apache.ignite.jdbc.thin.JdbcThinComplexQuerySelfTest;
+import org.apache.ignite.jdbc.thin.JdbcThinConnectionSSLTest;
 import org.apache.ignite.jdbc.thin.JdbcThinConnectionSelfTest;
 import org.apache.ignite.jdbc.thin.JdbcThinDeleteStatementSelfTest;
 import 
org.apache.ignite.jdbc.thin.JdbcThinDynamicIndexAtomicPartitionedNearSelfTest;
@@ -133,6 +134,7 @@ public class IgniteJdbcDriverTestSuite extends TestSuite {
 
 // New thin JDBC
 suite.addTest(new TestSuite(JdbcThinConnectionSelfTest.class));
+suite.addTest(new TestSuite(JdbcThinConnectionSSLTest.class));
 suite.addTest(new TestSuite(JdbcThinPreparedStatementSelfTest.class));
 suite.addTest(new TestSuite(JdbcThinResultSetSelfTest.class));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/42161cdd/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java
--
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java
new file mode 100644
index 000..cc71f51
--- /dev/null
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java
@@ -0,0 +1,479 @@
+/*
+ * 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.jdbc.thin;
+
+import java.security.NoSuchAlgorithmException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.concurrent.Callable;
+import javax.cache.configuration.Factory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.ClientConnectorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.

[12/50] [abbrv] ignite git commit: IGNITE-7561 .NET: Add IServices.GetDynamicServiceProxy

2018-02-09 Thread akuznetsov
IGNITE-7561 .NET: Add IServices.GetDynamicServiceProxy

This closes #3457


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

Branch: refs/heads/ignite-7485-2
Commit: f8d16749c14089b4fba840a2e424e411763a52da
Parents: 6ae7014
Author: Pavel Tupitsyn 
Authored: Thu Feb 1 14:53:16 2018 +0300
Committer: Pavel Tupitsyn 
Committed: Thu Feb 1 14:53:16 2018 +0300

--
 .../Services/ServiceProxyTest.cs|   3 +-
 .../Services/ServicesAsyncWrapper.cs|  18 ++-
 .../Services/ServicesTest.cs| 148 ++-
 .../Apache.Ignite.Core.csproj   |   1 +
 .../Impl/Services/DynamicServiceProxy.cs| 108 ++
 .../Impl/Services/ServiceProxyInvoker.cs|  14 +-
 .../Impl/Services/ServiceProxySerializer.cs |  37 +++--
 .../Impl/Services/Services.cs   |  43 +-
 .../Apache.Ignite.Core/Services/IServices.cs|  26 
 9 files changed, 363 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f8d16749/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServiceProxyTest.cs
--
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServiceProxyTest.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServiceProxyTest.cs
index 6146146..cb36d1d 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServiceProxyTest.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServiceProxyTest.cs
@@ -283,7 +283,8 @@ namespace Apache.Ignite.Core.Tests.Services
 // 1) Write to a stream
 inStream.WriteBool(SrvKeepBinary);  // WriteProxyMethod does 
not do this, but Java does
 
-
ServiceProxySerializer.WriteProxyMethod(_marsh.StartMarshal(inStream), method, 
args, Platform.DotNet);
+
ServiceProxySerializer.WriteProxyMethod(_marsh.StartMarshal(inStream), 
method.Name, 
+method, args, Platform.DotNet);
 
 inStream.SynchronizeOutput();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f8d16749/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesAsyncWrapper.cs
--
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesAsyncWrapper.cs
 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesAsyncWrapper.cs
index 18db5d5..cf058a9 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesAsyncWrapper.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesAsyncWrapper.cs
@@ -91,7 +91,7 @@ namespace Apache.Ignite.Core.Tests.Services
 }
 catch (AggregateException ex)
 {
-throw ex.InnerException;
+throw ex.InnerException ?? ex;
 }
 }
 
@@ -110,7 +110,7 @@ namespace Apache.Ignite.Core.Tests.Services
 }
 catch (AggregateException ex)
 {
-throw ex.InnerException;
+throw ex.InnerException ?? ex;
 }
 }
 
@@ -129,7 +129,7 @@ namespace Apache.Ignite.Core.Tests.Services
 }
 catch (AggregateException ex)
 {
-throw ex.InnerException;
+throw ex.InnerException ?? ex;
 }
 }
 
@@ -194,6 +194,18 @@ namespace Apache.Ignite.Core.Tests.Services
 }
 
 /**  */
+public dynamic GetDynamicServiceProxy(string name)
+{
+return _services.GetDynamicServiceProxy(name);
+}
+
+/**  */
+public dynamic GetDynamicServiceProxy(string name, bool sticky)
+{
+return _services.GetDynamicServiceProxy(name, sticky);
+}
+
+/**  */
 public IServices WithKeepBinary()
 {
 return new ServicesAsyncWrapper(_services.WithKeepBinary());

http://git-wip-us.apache.org/repos/asf/ignite/blob/f8d16749/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
--
diff --git 
a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs 
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
index b8f4cdf..c6a8e0b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
@@ -318,6 +318,67 @@ namespace Apach

[34/50] [abbrv] ignite git commit: IGNITE-6917: Implemented SQL COPY command

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/25d38cc9/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadStreamerWriter.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadStreamerWriter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadStreamerWriter.java
new file mode 100644
index 000..3e5efd9
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadStreamerWriter.java
@@ -0,0 +1,65 @@
+/*
+ * 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.bulkload;
+
+import org.apache.ignite.IgniteDataStreamer;
+import org.apache.ignite.lang.IgniteBiTuple;
+
+/**
+ * A bulk load cache writer object that adds entries using {@link 
IgniteDataStreamer}.
+ */
+public class BulkLoadStreamerWriter extends BulkLoadCacheWriter {
+/** Serialization version UID. */
+private static final long serialVersionUID = 0L;
+
+/** The streamer. */
+private final IgniteDataStreamer streamer;
+
+/**
+ * A number of {@link IgniteDataStreamer#addData(Object, Object)} calls 
made,
+ * since we don't have any kind of result data back from the streamer.
+ */
+private long updateCnt;
+
+/**
+ * Creates a cache writer.
+ *
+ * @param streamer The streamer to use.
+ */
+public BulkLoadStreamerWriter(IgniteDataStreamer streamer) 
{
+this.streamer = streamer;
+updateCnt = 0;
+}
+
+/** {@inheritDoc} */
+@Override public void apply(IgniteBiTuple entry) {
+streamer.addData(entry.getKey(), entry.getValue());
+
+updateCnt++;
+}
+
+/** {@inheritDoc} */
+@Override public void close() {
+streamer.close();
+}
+
+/** {@inheritDoc} */
+@Override public long updateCnt() {
+return updateCnt;
+}
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/25d38cc9/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/pipeline/CharsetDecoderBlock.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/pipeline/CharsetDecoderBlock.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/pipeline/CharsetDecoderBlock.java
new file mode 100644
index 000..5b18def
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/pipeline/CharsetDecoderBlock.java
@@ -0,0 +1,132 @@
+/*
+ * 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.bulkload.pipeline;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteIllegalStateException;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CoderResult;
+import java.nio.charset.CodingErrorAction;
+import java.util.Arrays;
+
+/**
+ * A {@link PipelineBlock}, which converts stream of bytes supplied as byte[] 
arrays to an array of char[] using
+ * the specified encoding. Decoding errors (malformed input and unmappable 
characters) are to handled by dropping
+ * the erroneous input, appending the coder's replacement value to the output 
buf

[07/50] [abbrv] ignite git commit: IGNITE-6946: Change Ignite Logger configuration on the fly. Fixes #3400.

2018-02-09 Thread akuznetsov
IGNITE-6946: Change Ignite Logger configuration on the fly. Fixes #3400.

Signed-off-by: Valentin Kulichenko 


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

Branch: refs/heads/ignite-7485-2
Commit: ebfab709eafb78dbd920183e647eba442cc45667
Parents: 0088405
Author: Stanislav Lukyanov 
Authored: Wed Jan 31 13:02:45 2018 -0800
Committer: Valentin Kulichenko 
Committed: Wed Jan 31 13:02:45 2018 -0800

--
 config/ignite-log4j2.xml|   2 +-
 .../apache/ignite/logger/log4j/Log4JLogger.java | 100 +++-
 modules/log4j/src/test/config/log4j-debug.xml   |  50 ++
 modules/log4j/src/test/config/log4j-info.xml|  50 ++
 .../logger/log4j/GridLog4jConfigUpdateTest.java | 163 +++
 .../logger/log4j/GridLog4jWatchDelayTest.java   |  49 ++
 .../ignite/testsuites/IgniteLog4jTestSuite.java |  35 ++--
 modules/log4j2/src/test/config/log4j2-debug.xml |  37 +
 modules/log4j2/src/test/config/log4j2-info.xml  |  37 +
 .../logger/log4j2/Log4j2ConfigUpdateTest.java   | 152 +
 .../testsuites/IgniteLog4j2TestSuite.java   |   2 +
 11 files changed, 649 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/ebfab709/config/ignite-log4j2.xml
--
diff --git a/config/ignite-log4j2.xml b/config/ignite-log4j2.xml
index 7154ae8..b55c563 100644
--- a/config/ignite-log4j2.xml
+++ b/config/ignite-log4j2.xml
@@ -17,7 +17,7 @@
   limitations under the License.
 -->
 
-
+
 
 
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ebfab709/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
--
diff --git 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
index 02e7b35..ec0a5b3 100644
--- 
a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
+++ 
b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
@@ -39,8 +39,10 @@ import org.apache.log4j.Category;
 import org.apache.log4j.ConsoleAppender;
 import org.apache.log4j.FileAppender;
 import org.apache.log4j.Level;
+import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
+import org.apache.log4j.helpers.FileWatchdog;
 import org.apache.log4j.varia.LevelRangeFilter;
 import org.apache.log4j.xml.DOMConfigurator;
 import org.jetbrains.annotations.Nullable;
@@ -184,25 +186,48 @@ public class Log4JLogger implements IgniteLogger, 
LoggerNodeIdAware, Log4jFileAw
 
 /**
  * Creates new logger with given configuration {@code path}.
+ * Calling this constructor is equivalent to calling {@code 
Log4JLogger(path, FileWatchdog.DEFAULT_DELAY}.
  *
  * @param path Path to log4j configuration XML file.
  * @throws IgniteCheckedException Thrown in case logger can't be created.
  */
 public Log4JLogger(final String path) throws IgniteCheckedException {
+this(path, FileWatchdog.DEFAULT_DELAY);
+}
+
+/**
+ * Creates new logger with given configuration {@code path}.
+ * 
+ * If {@code watchDelay} is not zero, created logger will check the 
configuration file for changes once every
+ * {@code watchDelay} milliseconds, and update its configuration if the 
file was changed.
+ * See {@link DOMConfigurator#configureAndWatch(String, long)} for details.
+ *
+ * @param path Path to log4j configuration XML file.
+ * @param watchDelay delay in milliseconds used to check configuration 
file for changes.
+ * @throws IgniteCheckedException Thrown in case logger can't be created.
+ */
+public Log4JLogger(final String path, long watchDelay) throws 
IgniteCheckedException {
 if (path == null)
 throw new IgniteCheckedException("Configuration XML file for Log4j 
must be specified.");
 
+if (watchDelay < 0)
+throw new IgniteCheckedException("watchDelay can't be negative: " 
+ watchDelay);
+
 this.cfg = path;
 
-final URL cfgUrl = U.resolveIgniteUrl(path);
+final File cfgFile = U.resolveIgnitePath(path);
 
-if (cfgUrl == null)
+if (cfgFile == null)
 throw new IgniteCheckedException("Log4j configuration path was not 
found: " + path);
 
 addConsoleAppenderIfNeeded(null, new C1() {
 @Override public Logger apply(Boolean init) {
-if (init)
-DOMConfigurator.configur

[09/50] [abbrv] ignite git commit: IGNITE-7590: fixed tree example

2018-02-09 Thread akuznetsov
IGNITE-7590: fixed tree example

this closes #3459


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

Branch: refs/heads/ignite-7485-2
Commit: a9d40a708bffeb2c3762e5cfbc00f9c33b02cd4d
Parents: 2e43749
Author: artemmalykh 
Authored: Thu Feb 1 12:43:02 2018 +0300
Committer: Yury Babak 
Committed: Thu Feb 1 12:43:02 2018 +0300

--
 .../examples/ml/MLExamplesCommonArgs.java   |  31 ++
 .../examples/ml/trees/DecisionTreesExample.java | 354 +++
 .../ignite/examples/ml/trees/MNISTExample.java  | 261 --
 .../testsuites/IgniteExamplesMLTestSuite.java   |   5 +-
 4 files changed, 388 insertions(+), 263 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/a9d40a70/examples/src/main/java/org/apache/ignite/examples/ml/MLExamplesCommonArgs.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/MLExamplesCommonArgs.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/MLExamplesCommonArgs.java
new file mode 100644
index 000..701894b
--- /dev/null
+++ 
b/examples/src/main/java/org/apache/ignite/examples/ml/MLExamplesCommonArgs.java
@@ -0,0 +1,31 @@
+/*
+ * 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.examples.ml;
+
+/**
+ * Some common arguments for examples in ML module.
+ */
+public class MLExamplesCommonArgs {
+/**
+ * Unattended argument.
+ */
+public static String UNATTENDED = "unattended";
+
+/** Empty args for ML examples. */
+public static final String[] EMPTY_ARGS_ML = new String[] {"--" + 
UNATTENDED};
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a9d40a70/examples/src/main/java/org/apache/ignite/examples/ml/trees/DecisionTreesExample.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/trees/DecisionTreesExample.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/trees/DecisionTreesExample.java
new file mode 100644
index 000..3860e8e
--- /dev/null
+++ 
b/examples/src/main/java/org/apache/ignite/examples/ml/trees/DecisionTreesExample.java
@@ -0,0 +1,354 @@
+/*
+ * 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.examples.ml.trees;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Random;
+import java.util.Scanner;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import java.util.zip.GZIPInputStream;
+import org.apache.commons.cli.BasicParser;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Opti

[14/50] [abbrv] ignite git commit: IGNITE-7599 Missed licenses in ignite-direct-io module

2018-02-09 Thread akuznetsov
IGNITE-7599 Missed licenses in ignite-direct-io module

Signed-off-by: Anton Vinogradov 


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

Branch: refs/heads/ignite-7485-2
Commit: d88af9b951480f107ea9612ca0d4023489d08d14
Parents: f92d20e
Author: dpavlov 
Authored: Thu Feb 1 18:31:12 2018 +0300
Committer: Anton Vinogradov 
Committed: Thu Feb 1 18:31:12 2018 +0300

--
 modules/direct-io/licenses/apache-2.0.txt | 202 +
 1 file changed, 202 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/d88af9b9/modules/direct-io/licenses/apache-2.0.txt
--
diff --git a/modules/direct-io/licenses/apache-2.0.txt 
b/modules/direct-io/licenses/apache-2.0.txt
new file mode 100644
index 000..d645695
--- /dev/null
+++ b/modules/direct-io/licenses/apache-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, "submitted"
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as "Not a Contribution."
+
+  "Contributor" shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+  this License, each Contributor hereby grants to You a perpetual,
+  worldwide, non-exclusive, no-charge, royalty-

[24/50] [abbrv] ignite git commit: IGNITE-7437: Fix javadoc in partition based dataset

2018-02-09 Thread akuznetsov
IGNITE-7437: Fix javadoc in partition based dataset

this closes #3472


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

Branch: refs/heads/ignite-7485-2
Commit: cfad55d39339660efc0daf06b11277a904a568c2
Parents: 08f9659
Author: dmitrievanthony 
Authored: Mon Feb 5 15:12:40 2018 +0300
Committer: Yury Babak 
Committed: Mon Feb 5 15:12:40 2018 +0300

--
 .../org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/cfad55d3/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java
--
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java
index cb321e4..f5a6bb0 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/preprocessing/PreprocessingTrainer.java
@@ -21,6 +21,7 @@ import org.apache.ignite.ml.dataset.DatasetBuilder;
 import org.apache.ignite.ml.math.functions.IgniteBiFunction;
 
 /**
+ * Trainer for preprocessor.
  *
  * @param  Type of a key in {@code upstream} data.
  * @param  Type of a value in {@code upstream} data.



[31/50] [abbrv] ignite git commit: IGNITE-7643: broken javadoc.

2018-02-09 Thread akuznetsov
IGNITE-7643: broken javadoc.

this closes #3480


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

Branch: refs/heads/ignite-7485-2
Commit: 7b37f6481112e09da231a13c926d67002437c36f
Parents: b50aa5e
Author: YuriBabak 
Authored: Wed Feb 7 12:48:06 2018 +0300
Committer: Yury Babak 
Committed: Wed Feb 7 12:48:06 2018 +0300

--
 .../ml/dataset/AlgorithmSpecificDatasetExample.java | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/7b37f648/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
index 98f85cd..b693dfa 100644
--- 
a/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
+++ 
b/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
@@ -42,11 +42,13 @@ import 
org.apache.ignite.ml.dataset.primitive.data.SimpleLabeledDatasetData;
  * {@link DatasetWrapper}) in a sequential manner.
  *
  * In this example we need to implement gradient descent. This is iterative 
method that involves calculation of gradient
- * on every step. In according with the common idea we defines {@link 
AlgorithmSpecificDataset} - extended version
- * of {@code Dataset} with {@code gradient} method. As result our gradient 
descent method looks like a simple loop where
- * every iteration includes call of the {@code gradient} method. In the 
example we want to keep iteration number as well
- * for logging. Iteration number cannot be recovered from the {@code upstream} 
data and we need to keep it in the custom
- * partition {@code context} which is represented by {@link 
AlgorithmSpecificPartitionContext} class.
+ * on every step. In according with the common idea we defines
+ * {@link AlgorithmSpecificDatasetExample.AlgorithmSpecificDataset} - extended 
version of {@code Dataset} with
+ * {@code gradient} method. As result our gradient descent method looks like a 
simple loop where every iteration
+ * includes call of the {@code gradient} method. In the example we want to 
keep iteration number as well for logging.
+ * Iteration number cannot be recovered from the {@code upstream} data and we 
need to keep it in the custom
+ * partition {@code context} which is represented by
+ * {@link AlgorithmSpecificDatasetExample.AlgorithmSpecificPartitionContext} 
class.
  */
 public class AlgorithmSpecificDatasetExample {
 /** Run example. */



[36/50] [abbrv] ignite git commit: IGNITE-6217: Added benchmark to compare JDBC vs native SQL

2018-02-09 Thread akuznetsov
IGNITE-6217: Added benchmark to compare JDBC vs native SQL

This closes #2558


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

Branch: refs/heads/ignite-7485-2
Commit: 63f6b1f4a251919bec4a4528afef964720323089
Parents: 25d38cc
Author: Pavel Kuznetsov 
Authored: Wed Feb 7 15:37:52 2018 +0300
Committer: Igor Sapego 
Committed: Wed Feb 7 15:40:58 2018 +0300

--
 ...benchmark-jdbc-thin-insert-delete.properties |  87 ++
 .../benchmark-jdbc-thin-select.properties   |  86 ++
 .../benchmark-jdbc-thin-update.properties   |  86 ++
 .../benchmark-jdbcv2-insert-delete.properties   |  87 ++
 .../config/benchmark-jdbcv2-select.properties   |  86 ++
 .../config/benchmark-jdbcv2-update.properties   |  88 +++
 ...enchmark-native-sql-insert-delete.properties |  87 ++
 .../benchmark-native-sql-select.properties  |  86 ++
 .../benchmark-native-sql-update.properties  |  86 ++
 modules/yardstick/config/ignite-jdbc-config.xml |   4 +-
 .../yardstick/IgniteBenchmarkArguments.java |  26 ++-
 .../org/apache/ignite/yardstick/IgniteNode.java |  12 +-
 .../yardstick/jdbc/AbstractJdbcBenchmark.java   | 158 +++
 .../yardstick/jdbc/AbstractNativeBenchmark.java |  37 +
 .../yardstick/jdbc/DisjointRangeGenerator.java  | 101 
 .../jdbc/JdbcSqlInsertDeleteBenchmark.java  |  66 
 .../jdbc/JdbcSqlQueryRangeBenchmark.java|  78 +
 .../yardstick/jdbc/JdbcSqlUpdateBenchmark.java  |  81 ++
 .../apache/ignite/yardstick/jdbc/JdbcUtils.java |  55 +++
 .../jdbc/NativeSqlInsertDeleteBenchmark.java|  61 +++
 .../jdbc/NativeSqlQueryRangeBenchmark.java  |  77 +
 .../jdbc/NativeSqlUpdateRangeBenchmark.java |  83 ++
 22 files changed, 1612 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/63f6b1f4/modules/yardstick/config/benchmark-jdbc-thin-insert-delete.properties
--
diff --git 
a/modules/yardstick/config/benchmark-jdbc-thin-insert-delete.properties 
b/modules/yardstick/config/benchmark-jdbc-thin-insert-delete.properties
new file mode 100644
index 000..ed072ed
--- /dev/null
+++ b/modules/yardstick/config/benchmark-jdbc-thin-insert-delete.properties
@@ -0,0 +1,87 @@
+#
+# 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.
+#
+
+#
+# Thin JDBC driver benchmarks for insert+delete queries
+#
+
+now0=`date +'%H%M%S'`
+
+# JVM options.
+JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
+
+# Uncomment to enable concurrent garbage collection (GC) if you encounter long 
GC pauses.
+JVM_OPTS=${JVM_OPTS}" \
+-Xms8g \
+-Xmx8g \
+-Xloggc:./gc${now0}.log \
+-XX:+PrintGCDetails \
+-verbose:gc \
+-XX:+UseParNewGC \
+-XX:+UseConcMarkSweepGC \
+-XX:+PrintGCDateStamps \
+"
+
+#Ignite version
+ver="RELEASE-"
+
+# List of default probes.
+# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on 
Linux).
+BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe,DStatProbe
+
+# Packages where the specified benchmark is searched by reflection mechanism.
+BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
+
+# Flag which indicates to restart the servers before every benchmark execution.
+RESTART_SERVERS=true
+
+# Probe point writer class name.
+# BENCHMARK_WRITER=
+
+# The benchmark is applicable only for 2 servers (the second server is started 
in client mode) and 1 driver.
+SERVER_HOSTS=localhost,localhost
+DRIVER_HOSTS=localhost
+
+# Remote username.
+# REMOTE_USER=
+
+# Number of nodes, used to wait for the specified number of nodes to start.
+nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo 
${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
+
+# Backups count.
+b=1
+
+# Warmup.
+w=30
+
+# Duration.
+d=300
+
+# Threads count.
+t=4
+
+# Sync mode.
+sm=PRIMARY_SYNC

[05/50] [abbrv] ignite git commit: IGNITE-6171 Native facility to control excessive GC pauses

2018-02-09 Thread akuznetsov
IGNITE-6171 Native facility to control excessive GC pauses

Signed-off-by: Anton Vinogradov 


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

Branch: refs/heads/ignite-7485-2
Commit: af8cb624220398e99954f892ffd12e072524066b
Parents: 2b7623a
Author: Dmitriy Sorokin 
Authored: Wed Jan 31 18:11:07 2018 +0300
Committer: Anton Vinogradov 
Committed: Wed Jan 31 18:11:07 2018 +0300

--
 .../apache/ignite/IgniteSystemProperties.java   |  12 ++
 .../apache/ignite/internal/IgniteKernal.java|  21 ++-
 .../ignite/internal/LongJVMPauseDetector.java   | 167 +++
 .../org/apache/ignite/mxbean/IgniteMXBean.java  |  25 +++
 4 files changed, 224 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/af8cb624/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 7761292..2b221a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -770,6 +770,18 @@ public final class IgniteSystemProperties {
  */
 public static final String IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID = 
"IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID";
 
+/** Ignite JVM pause detector disabled. */
+public static final String IGNITE_JVM_PAUSE_DETECTOR_DISABLED = 
"IGNITE_JVM_PAUSE_DETECTOR_DISABLED";
+
+/** Ignite JVM pause detector precision. */
+public static final String IGNITE_JVM_PAUSE_DETECTOR_PRECISION = 
"IGNITE_JVM_PAUSE_DETECTOR_PRECISION";
+
+/** Ignite JVM pause detector threshold. */
+public static final String IGNITE_JVM_PAUSE_DETECTOR_THRESHOLD = 
"IGNITE_JVM_PAUSE_DETECTOR_THRESHOLD";
+
+/** Ignite JVM pause detector last events count. */
+public static final String IGNITE_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNT = 
"IGNITE_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNT";
+
 /**
  * Default value is {@code false}.
  */

http://git-wip-us.apache.org/repos/asf/ignite/blob/af8cb624/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 3094963..e637a6b 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
@@ -130,8 +130,8 @@ import 
org.apache.ignite.internal.processors.cache.persistence.filename.PdsConsi
 import 
org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
 import org.apache.ignite.internal.processors.cluster.ClusterProcessor;
-import 
org.apache.ignite.internal.processors.cluster.IGridClusterStateProcessor;
 import org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor;
+import 
org.apache.ignite.internal.processors.cluster.IGridClusterStateProcessor;
 import 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor;
 import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessor;
 import 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor;
@@ -288,6 +288,10 @@ public class IgniteKernal implements IgniteEx, 
IgniteMXBean, Externalizable {
 /** Force complete reconnect future. */
 private static final Object STOP_RECONNECT = new Object();
 
+static {
+LongJVMPauseDetector.start();
+}
+
 /** */
 @GridToStringExclude
 private GridKernalContextImpl ctx;
@@ -460,6 +464,21 @@ public class IgniteKernal implements IgniteEx, 
IgniteMXBean, Externalizable {
 }
 
 /** {@inheritDoc} */
+@Override public long getLongJVMPausesCount() {
+return LongJVMPauseDetector.longPausesCount();
+}
+
+/** {@inheritDoc} */
+@Override public long getLongJVMPausesTotalDuration() {
+return LongJVMPauseDetector.longPausesTotalDuration();
+}
+
+/** {@inheritDoc} */
+@Override public Map getLongJVMPauseLastEvents() {
+return LongJVMPauseDetector.longPauseEvents();
+}
+
+/** {@inheritDoc} */
 @Override public String getUpTimeFormatted() {
 return X.timeSpan2HMSM(U.currentTimeMillis() - startTime);
 }

http://git-wip-us.apache.org

[21/50] [abbrv] ignite git commit: IGNITE-7437: Partition based dataset implementation

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/54bac750/modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
--
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
new file mode 100644
index 000..5c0d583
--- /dev/null
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
@@ -0,0 +1,95 @@
+/*
+ * 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.ml.dataset.impl.cache;
+
+import java.io.Serializable;
+import java.util.UUID;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.affinity.AffinityFunction;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.ml.dataset.DatasetBuilder;
+import org.apache.ignite.ml.dataset.PartitionContextBuilder;
+import org.apache.ignite.ml.dataset.PartitionDataBuilder;
+import org.apache.ignite.ml.dataset.impl.cache.util.ComputeUtils;
+import 
org.apache.ignite.ml.dataset.impl.cache.util.DatasetAffinityFunctionWrapper;
+
+/**
+ * A dataset builder that makes {@link CacheBasedDataset}. Encapsulate logic 
of building cache based dataset such as
+ * allocation required data structures and initialization of {@code context} 
part of partitions.
+ *
+ * @param  Type of a key in {@code upstream} data.
+ * @param  Type of a value in {@code upstream} data.
+ */
+public class CacheBasedDatasetBuilder implements DatasetBuilder {
+/** Number of retries for the case when one of partitions not found on the 
node where loading is performed. */
+private static final int RETRIES = 15 * 60;
+
+/** Retry interval (ms) for the case when one of partitions not found on 
the node where loading is performed. */
+private static final int RETRY_INTERVAL = 1000;
+
+/** Template of the name of Ignite Cache containing partition {@code 
context}. */
+private static final String DATASET_CACHE_TEMPLATE = "%s_DATASET_%s";
+
+/** Ignite instance. */
+private final Ignite ignite;
+
+/** Ignite Cache with {@code upstream} data. */
+private final IgniteCache upstreamCache;
+
+/**
+ * Constructs a new instance of cache based dataset builder that makes 
{@link CacheBasedDataset}.
+ *
+ * @param ignite Ignite instance.
+ * @param upstreamCache Ignite Cache with {@code upstream} data.
+ */
+public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache 
upstreamCache) {
+this.ignite = ignite;
+this.upstreamCache = upstreamCache;
+}
+
+/** {@inheritDoc} */
+@SuppressWarnings("unchecked")
+@Override public  
CacheBasedDataset build(
+PartitionContextBuilder partCtxBuilder, 
PartitionDataBuilder partDataBuilder) {
+UUID datasetId = UUID.randomUUID();
+
+// Retrieves affinity function of the upstream Ignite Cache.
+CacheConfiguration upstreamCacheConfiguration = 
upstreamCache.getConfiguration(CacheConfiguration.class);
+AffinityFunction upstreamCacheAffinity = 
upstreamCacheConfiguration.getAffinity();
+
+// Creates dataset cache configuration with affinity function that 
mimics to affinity function of the upstream
+// cache.
+CacheConfiguration datasetCacheConfiguration = new 
CacheConfiguration<>();
+
datasetCacheConfiguration.setName(String.format(DATASET_CACHE_TEMPLATE, 
upstreamCache.getName(), datasetId));
+datasetCacheConfiguration.setAffinity(new 
DatasetAffinityFunctionWrapper(upstreamCacheAffinity));
+
+IgniteCache datasetCache = 
ignite.createCache(datasetCacheConfiguration);
+
+ComputeUtils.initContext(
+ignite,
+upstreamCache.getName(),
+datasetCache.getName(),
+partCtxBuilder,
+RETRIES,
+RETRY_INTERVAL
+);
+
+return new CacheBasedDataset<>(ignite, upstreamCache, datasetCache, 
partDataBuilder, datasetId);
+}
+}

http://git-wip-us.apache.org/repos/asf/igni

[29/50] [abbrv] ignite git commit: IGNITE-7533 Throttle writing threads according to fsync progress - Fixes #3437.

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/b50aa5eb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/ProgressWatchdog.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/ProgressWatchdog.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/ProgressWatchdog.java
new file mode 100644
index 000..55ca2a9
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/checkpoint/ProgressWatchdog.java
@@ -0,0 +1,495 @@
+/*
+ * 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.persistence.db.checkpoint;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.atomic.LongAdder;
+import org.apache.ignite.DataRegionMetrics;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
+import 
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
+import 
org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
+import 
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl;
+import 
org.apache.ignite.internal.processors.cache.persistence.pagemem.PagesWriteSpeedBasedThrottle;
+import 
org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer;
+import 
org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager;
+import org.apache.ignite.internal.util.typedef.X;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Process watchdog for ignite instance. Detects gaps in progress, prints and 
saves summary of execution metrics to
+ * file. Client implementation should use {@link 
ProgressWatchdog#reportProgress(int)} to show how much data was
+ * processed at client size. Long absence of this calls will cause thread 
dumps to be generated.
+ */
+class ProgressWatchdog {
+public static final int CHECK_PERIOD_MSEC = 1000;
+/** Progress counter, Overall records processed. */
+private final LongAdder overallRecordsProcessed = new LongAdder();
+
+/** Metrics log Txt file writer. */
+private final FileWriter txtWriter;
+
+/** Client threads name, included into thread dumps. */
+private String clientThreadsName;
+
+/** Service for scheduled execution of watchdog. */
+private ScheduledExecutorService svc = Executors.newScheduledThreadPool(1);
+
+/** Operation name for messages and log. */
+private final String operation;
+
+/** Ignite instance. */
+private Ignite ignite;
+
+/** Stopping flag, indicates ignite close was called but stop is not 
finished. */
+private volatile boolean stopping;
+
+/** Value of records count at previous tick, see {@link 
#overallRecordsProcessed} */
+private final AtomicLong prevRecordsCnt = new AtomicLong();
+
+/** Milliseconds elapsed at previous tick. */
+private final AtomicLong prevMsElapsed = new AtomicLong();
+
+/** Checkpoint written pages at previous tick. */
+private final AtomicLong prevCpWrittenPages = new AtomicLong();
+
+/** Checkpoint fsync()'ed pages at previous tick. */
+private final AtomicLong prevCpSyncedPages = new Atomi

[44/50] [abbrv] ignite git commit: IGNITE-7606 Write replaced page outside segment write lock - Fixes #3469.

2018-02-09 Thread akuznetsov
IGNITE-7606 Write replaced page outside segment write lock - Fixes #3469.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/ignite-7485-2
Commit: b2f8cf8f436e544911b110ad6e2643329af99d4f
Parents: b253156
Author: dpavlov 
Authored: Thu Feb 8 18:14:00 2018 +0300
Committer: Alexey Goncharuk 
Committed: Thu Feb 8 21:46:26 2018 +0300

--
 .../apache/ignite/IgniteSystemProperties.java   |   6 +
 .../internal/pagemem/PageIdAllocator.java   |   3 +-
 .../CheckpointWriteProgressSupplier.java|  45 +++
 .../GridCacheDatabaseSharedManager.java |  53 ++--
 .../pagemem/DelayedDirtyPageWrite.java  | 105 +++
 .../pagemem/DelayedPageReplacementTracker.java  | 198 
 .../persistence/pagemem/PageMemoryImpl.java | 148 +
 .../pagemem/PagesWriteSpeedBasedThrottle.java   |  30 +-
 .../persistence/pagemem/PagesWriteThrottle.java |  24 +-
 .../persistence/pagemem/ReplacedPageWriter.java |  35 +++
 .../checkpoint/IgniteMassLoadSandboxTest.java   |   4 +-
 .../pagemem/BPlusTreePageMemoryImplTest.java|  19 +-
 .../BPlusTreeReuseListPageMemoryImplTest.java   |  18 +-
 ...gnitePageMemReplaceDelayedWriteUnitTest.java | 307 +++
 .../pagemem/IgniteThrottlingUnitTest.java   |  22 +-
 .../pagemem/IndexStoragePageMemoryImplTest.java |  18 +-
 .../pagemem/PageMemoryImplNoLoadTest.java   |  12 +-
 .../persistence/pagemem/PageMemoryImplTest.java |  13 +-
 .../testsuites/IgnitePdsUnitTestSuite.java  |   4 +-
 19 files changed, 891 insertions(+), 173 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b2f8cf8f/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 2b221a1..8e72099 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -811,6 +811,12 @@ public final class IgniteSystemProperties {
 public static final String IGNITE_DEV_ONLY_LOGGING_DISABLED = 
"IGNITE_DEV_ONLY_LOGGING_DISABLED";
 
 /**
+ * When set to {@code true} (default), pages are written to page store 
without holding segment lock (with delay).
+ * Because other thread may require exactly the same page to be loaded 
from store, reads are protected by locking.
+ */
+public static final String IGNITE_DELAYED_REPLACED_PAGE_WRITE = 
"IGNITE_DELAYED_REPLACED_PAGE_WRITE";
+
+/**
  * Enforces singleton.
  */
 private IgniteSystemProperties() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b2f8cf8f/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
index dc504fe..ae7da14 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageIdAllocator.java
@@ -38,6 +38,7 @@ public interface PageIdAllocator {
 /**
  * Allocates a page from the space for the given partition ID and the 
given flags.
  *
+ * @param cacheId Cache Group ID.
  * @param partId Partition ID.
  * @return Allocated page ID.
  */
@@ -46,7 +47,7 @@ public interface PageIdAllocator {
 /**
  * The given page is free now.
  *
- * @param cacheId Cache ID.
+ * @param cacheId Cache Group ID.
  * @param pageId Page ID.
  */
 public boolean freePage(int cacheId, long pageId) throws 
IgniteCheckedException;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b2f8cf8f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointWriteProgressSupplier.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointWriteProgressSupplier.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointWriteProgressSupplier.java
new file mode 100644
index 000..d20e8d4
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointWriteProgressSu

[10/50] [abbrv] ignite git commit: ignite-2.5.0 Update version.

2018-02-09 Thread akuznetsov
ignite-2.5.0 Update version.


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

Branch: refs/heads/ignite-7485-2
Commit: 9253035cd664f58b601505dc5eae4da6fe27d814
Parents: a9d40a7
Author: Alexey Kuznetsov 
Authored: Thu Feb 1 17:03:36 2018 +0700
Committer: Alexey Kuznetsov 
Committed: Thu Feb 1 17:03:36 2018 +0700

--
 modules/web-console/frontend/app/services/Version.service.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/9253035c/modules/web-console/frontend/app/services/Version.service.js
--
diff --git a/modules/web-console/frontend/app/services/Version.service.js 
b/modules/web-console/frontend/app/services/Version.service.js
index 9bd9c7d..ece8fcb 100644
--- a/modules/web-console/frontend/app/services/Version.service.js
+++ b/modules/web-console/frontend/app/services/Version.service.js
@@ -73,7 +73,7 @@ const compare = (a, b) => {
 
 export default class IgniteVersion {
 constructor() {
-this.webConsole = '2.4.0';
+this.webConsole = '2.5.0';
 
 this.supportedVersions = [
 {



[18/50] [abbrv] ignite git commit: IGNITE-7612 Web Console: Refactored mongoose schemas to separate module.

2018-02-09 Thread akuznetsov
IGNITE-7612 Web Console: Refactored mongoose schemas to separate module.


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

Branch: refs/heads/ignite-7485-2
Commit: 71db7079343955a36753a88a17a38dae34a22a3b
Parents: 958975e
Author: Alexey Kuznetsov 
Authored: Fri Feb 2 17:09:37 2018 +0700
Committer: Alexey Kuznetsov 
Committed: Fri Feb 2 17:09:37 2018 +0700

--
 modules/web-console/backend/app/mongo.js  | 1127 +--
 modules/web-console/backend/app/schemas.js| 1147 
 modules/web-console/backend/services/users.js |1 +
 3 files changed, 1159 insertions(+), 1116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/71db7079/modules/web-console/backend/app/mongo.js
--
diff --git a/modules/web-console/backend/app/mongo.js 
b/modules/web-console/backend/app/mongo.js
index bd03d6a..661d6f9 100644
--- a/modules/web-console/backend/app/mongo.js
+++ b/modules/web-console/backend/app/mongo.js
@@ -17,7 +17,7 @@
 
 'use strict';
 
-const passportMongo = require('passport-local-mongoose');
+const _ = require('lodash');
 
 // Fire me up!
 
@@ -26,1130 +26,25 @@ const passportMongo = require('passport-local-mongoose');
  */
 module.exports = {
 implements: 'mongo',
-inject: ['settings', 'mongoose']
+inject: ['settings', 'mongoose', 'schemas']
 };
 
-const defineSchema = (mongoose) => {
-const Schema = mongoose.Schema;
+const defineSchema = (mongoose, schemas) => {
 const ObjectId = mongoose.Schema.Types.ObjectId;
 const result = { connection: mongoose.connection };
 
 result.ObjectId = ObjectId;
 
-// Define Account schema.
-const AccountSchema = new Schema({
-firstName: String,
-lastName: String,
-email: String,
-phone: String,
-company: String,
-country: String,
-registered: Date,
-lastLogin: Date,
-lastActivity: Date,
-admin: Boolean,
-token: String,
-resetPasswordToken: String
-});
-
-// Install passport plugin.
-AccountSchema.plugin(passportMongo, {
-usernameField: 'email', limitAttempts: true, lastLoginField: 
'lastLogin',
-usernameLowerCase: true
-});
-
-const transform = (doc, ret) => {
-return {
-_id: ret._id,
-email: ret.email,
-phone: ret.phone,
-firstName: ret.firstName,
-lastName: ret.lastName,
-company: ret.company,
-country: ret.country,
-admin: ret.admin,
-token: ret.token,
-registered: ret.registered,
-lastLogin: ret.lastLogin,
-lastActivity: ret.lastActivity
-};
-};
-
-// Configure transformation to JSON.
-AccountSchema.set('toJSON', { transform });
-
-// Configure transformation to JSON.
-AccountSchema.set('toObject', { transform });
-
 result.errCodes = {
 DUPLICATE_KEY_ERROR: 11000,
 DUPLICATE_KEY_UPDATE_ERROR: 11001
 };
 
-// Define Account model.
-result.Account = mongoose.model('Account', AccountSchema);
-
-// Define Space model.
-result.Space = mongoose.model('Space', new Schema({
-name: String,
-owner: {type: ObjectId, ref: 'Account'},
-demo: {type: Boolean, default: false},
-usedBy: [{
-permission: {type: String, enum: ['VIEW', 'FULL']},
-account: {type: ObjectId, ref: 'Account'}
-}]
-}));
-
-// Define Domain model schema.
-const DomainModelSchema = new Schema({
-space: {type: ObjectId, ref: 'Space', index: true, required: true},
-caches: [{type: ObjectId, ref: 'Cache'}],
-queryMetadata: {type: String, enum: ['Annotations', 'Configuration']},
-kind: {type: String, enum: ['query', 'store', 'both']},
-tableName: String,
-keyFieldName: String,
-valueFieldName: String,
-databaseSchema: String,
-databaseTable: String,
-keyType: String,
-valueType: {type: String},
-keyFields: [{
-databaseFieldName: String,
-databaseFieldType: String,
-javaFieldName: String,
-javaFieldType: String
-}],
-valueFields: [{
-databaseFieldName: String,
-databaseFieldType: String,
-javaFieldName: String,
-javaFieldType: String
-}],
-queryKeyFields: [String],
-fields: [{name: String, className: String}],
-aliases: [{field: String, alias: String}],
-indexes: [{

[22/50] [abbrv] ignite git commit: IGNITE-7437: Partition based dataset implementation

2018-02-09 Thread akuznetsov
IGNITE-7437: Partition based dataset implementation

this closes #3410


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

Branch: refs/heads/ignite-7485-2
Commit: 54bac750098bba32993754935e867bfbdd42ebef
Parents: eee4f17
Author: dmitrievanthony 
Authored: Sun Feb 4 21:06:02 2018 +0300
Committer: Yury Babak 
Committed: Sun Feb 4 21:06:02 2018 +0300

--
 .../AlgorithmSpecificDatasetExample.java| 195 ++
 .../ml/dataset/CacheBasedDatasetExample.java|  90 +
 .../ml/dataset/LocalDatasetExample.java |  84 
 .../examples/ml/dataset/model/Person.java   |  58 +++
 .../examples/ml/dataset/model/package-info.java |  22 ++
 .../examples/ml/dataset/package-info.java   |  22 ++
 .../ml/preprocessing/NormalizationExample.java  | 109 ++
 .../examples/ml/preprocessing/package-info.java |  22 ++
 modules/ml/pom.xml  |   7 +
 .../org/apache/ignite/ml/dataset/Dataset.java   | 213 ++
 .../ignite/ml/dataset/DatasetBuilder.java   |  49 +++
 .../ignite/ml/dataset/DatasetFactory.java   | 387 +++
 .../ml/dataset/PartitionContextBuilder.java |  58 +++
 .../ignite/ml/dataset/PartitionDataBuilder.java |  63 +++
 .../apache/ignite/ml/dataset/UpstreamEntry.java |  53 +++
 .../dataset/impl/cache/CacheBasedDataset.java   | 168 
 .../impl/cache/CacheBasedDatasetBuilder.java|  95 +
 .../ml/dataset/impl/cache/package-info.java |  22 ++
 .../dataset/impl/cache/util/ComputeUtils.java   | 251 
 .../util/DatasetAffinityFunctionWrapper.java|  75 
 .../impl/cache/util/PartitionDataStorage.java   |  65 
 .../impl/cache/util/UpstreamCursorAdapter.java  |  68 
 .../dataset/impl/cache/util/package-info.java   |  22 ++
 .../ml/dataset/impl/local/LocalDataset.java |  88 +
 .../dataset/impl/local/LocalDatasetBuilder.java | 137 +++
 .../ml/dataset/impl/local/package-info.java |  22 ++
 .../ignite/ml/dataset/impl/package-info.java|  22 ++
 .../apache/ignite/ml/dataset/package-info.java  |  22 ++
 .../ml/dataset/primitive/DatasetWrapper.java|  63 +++
 .../ml/dataset/primitive/SimpleDataset.java | 216 +++
 .../dataset/primitive/SimpleLabeledDataset.java |  39 ++
 .../builder/context/EmptyContextBuilder.java|  39 ++
 .../primitive/builder/context/package-info.java |  22 ++
 .../builder/data/SimpleDatasetDataBuilder.java  |  76 
 .../data/SimpleLabeledDatasetDataBuilder.java   |  86 +
 .../primitive/builder/data/package-info.java|  22 ++
 .../dataset/primitive/builder/package-info.java |  22 ++
 .../dataset/primitive/context/EmptyContext.java |  28 ++
 .../dataset/primitive/context/package-info.java |  22 ++
 .../primitive/data/SimpleDatasetData.java   |  69 
 .../data/SimpleLabeledDatasetData.java  |  79 
 .../ml/dataset/primitive/data/package-info.java |  22 ++
 .../ml/dataset/primitive/package-info.java  |  28 ++
 .../ml/preprocessing/PreprocessingTrainer.java  |  41 ++
 .../NormalizationPartitionData.java |  58 +++
 .../NormalizationPreprocessor.java  |  88 +
 .../normalization/NormalizationTrainer.java |  90 +
 .../normalization/package-info.java |  22 ++
 .../ignite/ml/preprocessing/package-info.java   |  22 ++
 .../org/apache/ignite/ml/IgniteMLTestSuite.java |   6 +-
 .../ignite/ml/dataset/DatasetTestSuite.java |  45 +++
 .../cache/CacheBasedDatasetBuilderTest.java | 107 +
 .../impl/cache/CacheBasedDatasetTest.java   | 353 +
 .../impl/cache/util/ComputeUtilsTest.java   | 309 +++
 .../DatasetAffinityFunctionWrapperTest.java | 110 ++
 .../cache/util/PartitionDataStorageTest.java|  49 +++
 .../impl/local/LocalDatasetBuilderTest.java |  91 +
 .../dataset/primitive/DatasetWrapperTest.java   |  87 +
 .../preprocessing/PreprocessingTestSuite.java   |  35 ++
 .../NormalizationPreprocessorTest.java  |  54 +++
 .../normalization/NormalizationTrainerTest.java |  76 
 61 files changed, 4964 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/54bac750/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/dataset/AlgorithmSpecificDatasetExample.java
new file mode 100644
index 000..98f85cd
--- /dev/null
+++ 
b/examples/src/main/java/org/apache/ignite

[16/50] [abbrv] ignite git commit: IGNITE-7580 Fix compatibilityMode flag consistency

2018-02-09 Thread akuznetsov
IGNITE-7580 Fix compatibilityMode flag consistency

This closes #3466


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

Branch: refs/heads/ignite-7485-2
Commit: 8f2045e364a4dab71cb99138d99e90b80bfc2de5
Parents: 283ab0c
Author: Sergey Chugunov 
Authored: Fri Feb 2 11:24:29 2018 +0300
Committer: Pavel Tupitsyn 
Committed: Fri Feb 2 11:24:29 2018 +0300

--
 .../cluster/GridClusterStateProcessor.java  | 31 +---
 1 file changed, 1 insertion(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/8f2045e3/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
index aa23b61..eaceb69 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
@@ -65,7 +65,6 @@ import org.apache.ignite.internal.util.typedef.CI2;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteCallable;
 import org.apache.ignite.lang.IgniteFuture;
@@ -643,7 +642,7 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
 BaselineTopologyHistory historyToSend = null;
 
 if (joiningNodeData != null) {
-if (!joiningNodeData.hasJoiningNodeData()) {
+if (!joiningNodeData.hasJoiningNodeData() || 
compatibilityMode) {
 //compatibility mode: old nodes don't send any data on 
join, so coordinator of new version
 //doesn't send BaselineTopology history, only its current 
globalState
 dataBag.addGridCommonData(STATE_PROC.ordinal(), 
globalState);
@@ -791,40 +790,12 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
 return bltNodes;
 }
 
-/**
- * Verifies all nodes in current cluster topology support BaselineTopology 
feature
- * so compatibilityMode flag is enabled to reset.
- *
- * @param discoCache
- */
-private void verifyBaselineTopologySupport(DiscoCache discoCache) {
-if 
(discoCache.minimumServerNodeVersion().compareTo(MIN_BLT_SUPPORTING_VER) < 0) {
-SB sb = new SB("Cluster contains nodes that don't support 
BaselineTopology: [");
-
-for (ClusterNode cn : discoCache.serverNodes()) {
-if (cn.version().compareTo(MIN_BLT_SUPPORTING_VER) < 0)
-sb
-.a("[")
-.a(cn.consistentId())
-.a(":")
-.a(cn.version())
-.a("], ");
-}
-
-sb.d(sb.length() - 2, sb.length());
-
-throw new IgniteException(sb.a("]").toString());
-}
-}
-
 /** */
 private IgniteInternalFuture changeGlobalState0(final boolean activate,
 BaselineTopology blt, boolean forceChangeBaselineTopology) {
 if (ctx.isDaemon() || ctx.clientNode()) {
 GridFutureAdapter fut = new GridFutureAdapter<>();
 
-verifyBaselineTopologySupport(ctx.discovery().discoCache());
-
 sendComputeChangeGlobalState(activate, blt, 
forceChangeBaselineTopology, fut);
 
 return fut;



[41/50] [abbrv] ignite git commit: IGNITE-425: Implementation of ContinuousQueryWithTransformer

2018-02-09 Thread akuznetsov
IGNITE-425: Implementation of ContinuousQueryWithTransformer


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

Branch: refs/heads/ignite-7485-2
Commit: a83f3038a9424a5eb826cf35da8d22496a551b50
Parents: c917327
Author: Nikolay Izhikov 
Authored: Thu Feb 8 14:51:32 2018 +0300
Committer: Nikolay Izhikov 
Committed: Thu Feb 8 14:51:32 2018 +0300

--
 .../cache/query/AbstractContinuousQuery.java| 202 
 .../ignite/cache/query/ContinuousQuery.java | 172 +--
 .../query/ContinuousQueryWithTransformer.java   | 192 +++
 .../processors/cache/IgniteCacheProxyImpl.java  |  82 ++-
 .../continuous/CacheContinuousQueryEntry.java   |   9 +-
 .../continuous/CacheContinuousQueryHandler.java | 149 +-
 .../CacheContinuousQueryHandlerV2.java  |   9 +-
 .../CacheContinuousQueryHandlerV3.java  | 185 +++
 .../continuous/CacheContinuousQueryManager.java |  44 +-
 ...acheContinuousQueryRandomOperationsTest.java | 156 --
 ...ContinuousWithTransformerClientSelfTest.java |  40 ++
 ...heContinuousWithTransformerFailoverTest.java | 309 +++
 ...eContinuousWithTransformerLocalSelfTest.java |  29 ++
 ...nuousWithTransformerPartitionedSelfTest.java |  29 ++
 ...uousWithTransformerRandomOperationsTest.java |  31 ++
 ...inuousWithTransformerReplicatedSelfTest.java | 511 +++
 .../IgniteCacheQuerySelfTestSuite3.java |  13 +
 17 files changed, 1919 insertions(+), 243 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/a83f3038/modules/core/src/main/java/org/apache/ignite/cache/query/AbstractContinuousQuery.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/query/AbstractContinuousQuery.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/query/AbstractContinuousQuery.java
new file mode 100644
index 000..2a615ee
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/query/AbstractContinuousQuery.java
@@ -0,0 +1,202 @@
+/*
+ * 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.cache.query;
+
+import javax.cache.Cache;
+import javax.cache.configuration.Factory;
+import javax.cache.event.CacheEntryEventFilter;
+import javax.cache.event.EventType;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteAsyncCallback;
+
+/**
+ * Base class for continuous query.
+ *
+ * @see ContinuousQuery
+ * @see ContinuousQueryWithTransformer
+ */
+public abstract class AbstractContinuousQuery extends 
Query> {
+/**
+ * Default page size. Size of {@code 1} means that all entries
+ * will be sent to master node immediately (buffering is disabled).
+ */
+public static final int DFLT_PAGE_SIZE = 1;
+
+/** Maximum default time interval after which buffer will be flushed (if 
buffering is enabled). */
+public static final long DFLT_TIME_INTERVAL = 0;
+
+/**
+ * Default value for automatic unsubscription flag. Remote filters
+ * will be unregistered by default if master node leaves topology.
+ */
+public static final boolean DFLT_AUTO_UNSUBSCRIBE = true;
+
+/** Initial query. */
+private Query> initQry;
+
+/** Remote filter factory. */
+private Factory> rmtFilterFactory;
+
+/** Time interval. */
+private long timeInterval = DFLT_TIME_INTERVAL;
+
+/** Automatic unsubscription flag. */
+private boolean autoUnsubscribe = DFLT_AUTO_UNSUBSCRIBE;
+
+/** Whether to notify about {@link EventType#EXPIRED} events. */
+private boolean includeExpired;
+
+/**
+ * Sets initial query.
+ * 
+ * This query will be executed before continuous listener is registered
+ * which allows to iterate through entries which already existed at the
+ * time continuous query is executed.
+ *
+ * @param initQry In

[17/50] [abbrv] ignite git commit: IGNITE-7610 Web Console: Profile page refactored to component.

2018-02-09 Thread akuznetsov
IGNITE-7610 Web Console: Profile page refactored to component.


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

Branch: refs/heads/ignite-7485-2
Commit: 958975e868de174b6c5e09f284cee2c0c427e508
Parents: 8f2045e
Author: Alexey Kuznetsov 
Authored: Fri Feb 2 17:07:57 2018 +0700
Committer: Alexey Kuznetsov 
Committed: Fri Feb 2 17:07:57 2018 +0700

--
 modules/web-console/frontend/app/app.js |  7 +-
 .../app/components/page-profile/component.js| 24 +
 .../app/components/page-profile/controller.js   | 79 
 .../app/components/page-profile/index.js| 36 
 .../app/components/page-profile/template.pug| 83 +
 .../frontend/app/data/countries.json|  4 +
 .../app/modules/states/profile.state.js | 36 
 .../frontend/controllers/profile-controller.js  | 94 
 .../frontend/views/settings/profile.tpl.pug | 83 -
 9 files changed, 229 insertions(+), 217 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/958975e8/modules/web-console/frontend/app/app.js
--
diff --git a/modules/web-console/frontend/app/app.js 
b/modules/web-console/frontend/app/app.js
index dcb369d..c19018c 100644
--- a/modules/web-console/frontend/app/app.js
+++ b/modules/web-console/frontend/app/app.js
@@ -29,7 +29,6 @@ import './modules/states/signin.state';
 import './modules/states/logout.state';
 import './modules/states/password.state';
 import './modules/states/configuration.state';
-import './modules/states/profile.state';
 import './modules/states/admin.state';
 import './modules/states/errors.state';
 
@@ -108,7 +107,6 @@ import uiGridSubcategories from 
'./filters/uiGridSubcategories.filter';
 import id8 from './filters/id8.filter';
 
 // Controllers
-import profile from 'Controllers/profile-controller';
 import resetPassword from './controllers/reset-password.controller';
 
 // Components
@@ -136,6 +134,8 @@ import listEditable from './components/list-editable';
 import clusterSelector from './components/cluster-selector';
 import connectedClusters from './components/connected-clusters';
 
+import pageProfile from './components/page-profile';
+
 import igniteServices from './services';
 
 // Inject external modules.
@@ -182,7 +182,6 @@ angular.module('ignite-console', [
 'ignite-console.states.logout',
 'ignite-console.states.password',
 'ignite-console.states.configuration',
-'ignite-console.states.profile',
 'ignite-console.states.admin',
 'ignite-console.states.errors',
 // Common modules.
@@ -218,6 +217,7 @@ angular.module('ignite-console', [
 clusterSelector.name,
 connectedClusters.name,
 igniteListOfRegisteredUsers.name,
+pageProfile.name,
 // Ignite modules.
 IgniteModules.name
 ])
@@ -269,7 +269,6 @@ angular.module('ignite-console', [
 .service(CSV.name, CSV)
 // Controllers.
 .controller(...resetPassword)
-.controller(...profile)
 // Filters.
 .filter('byName', byName)
 .filter('defaultName', defaultName)

http://git-wip-us.apache.org/repos/asf/ignite/blob/958975e8/modules/web-console/frontend/app/components/page-profile/component.js
--
diff --git 
a/modules/web-console/frontend/app/components/page-profile/component.js 
b/modules/web-console/frontend/app/components/page-profile/component.js
new file mode 100644
index 000..9578339
--- /dev/null
+++ b/modules/web-console/frontend/app/components/page-profile/component.js
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+import template from './template.pug';
+import controller from './controller';
+
+export default {
+template,
+controller
+};

http://git-wip-us.apache.org/repos/asf/ignite/blob/958975e8/modules/web-console/fron

[04/50] [abbrv] ignite git commit: IGNITE-7573 Fixed full API tests to be compliant with baseline topology

2018-02-09 Thread akuznetsov
IGNITE-7573 Fixed full API tests to be compliant with baseline topology


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

Branch: refs/heads/ignite-7485-2
Commit: 2b7623acf09879ea62357fbf5019ee9aece70f30
Parents: e74519f
Author: Alexey Goncharuk 
Authored: Wed Jan 31 16:52:24 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Jan 31 16:52:24 2018 +0300

--
 .../cache/GridCacheAbstractFullApiSelfTest.java  | 11 ---
 .../baseline/IgniteBaselineAbstractFullApiSelfTest.java  |  4 +++-
 2 files changed, 7 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/2b7623ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index e6c9589..2e6a19c 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -463,14 +463,11 @@ public abstract class GridCacheAbstractFullApiSelfTest 
extends GridCacheAbstract
 for (int i = 0; i < gridCount(); i++)
 assertEquals(globalPrimarySize, jcache(i).size(PRIMARY));
 
-int times = 1;
+// Check how many instances of any given key there is in the cluster.
+int globalSize = 0;
 
-if (cacheMode() == REPLICATED)
-times = gridCount();
-else if (cacheMode() == PARTITIONED)
-times = Math.min(gridCount(), 
jcache().getConfiguration(CacheConfiguration.class).getBackups() + 1);
-
-int globalSize = globalPrimarySize * times;
+for (String key : map.keySet())
+globalSize += 
affinity(jcache()).mapKeyToPrimaryAndBackups(key).size();
 
 for (int i = 0; i < gridCount(); i++)
 assertEquals(globalSize, jcache(i).size(ALL));

http://git-wip-us.apache.org/repos/asf/ignite/blob/2b7623ac/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
index 8dcfc0b..d78c289 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/IgniteBaselineAbstractFullApiSelfTest.java
@@ -19,6 +19,7 @@ package 
org.apache.ignite.internal.processors.cache.persistence.baseline;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.WALMode;
 import 
org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
 
 /**
@@ -33,7 +34,8 @@ public abstract class IgniteBaselineAbstractFullApiSelfTest 
extends GridCacheAbs
 .setDefaultDataRegionConfiguration(
 new DataRegionConfiguration()
 .setMaxSize(200 * 1024 * 1024)
-.setPersistenceEnabled(true)));
+.setPersistenceEnabled(true))
+.setWalMode(WALMode.LOG_ONLY));
 
 return cfg;
 }



[11/50] [abbrv] ignite git commit: IGNITE-7569 Fixing index rebuild future

2018-02-09 Thread akuznetsov
IGNITE-7569 Fixing index rebuild future


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

Branch: refs/heads/ignite-7485-2
Commit: 6ae70146609aee8014747de156f05bca3549ce3f
Parents: 9253035
Author: Alexey Goncharuk 
Authored: Thu Feb 1 13:17:28 2018 +0300
Committer: Alexey Goncharuk 
Committed: Thu Feb 1 13:17:47 2018 +0300

--
 .../GridCacheDatabaseSharedManager.java | 32 +++-
 1 file changed, 24 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/6ae70146/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 0b35f18..5dc81c5 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -71,6 +71,7 @@ import org.apache.ignite.configuration.DataPageEvictionMode;
 import org.apache.ignite.configuration.DataRegionConfiguration;
 import org.apache.ignite.configuration.DataStorageConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.events.DiscoveryEvent;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.GridKernalContext;
@@ -1132,19 +1133,34 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 if (cctx.kernalContext().query().moduleEnabled()) {
 ExchangeActions acts = fut.exchangeActions();
 
-if (acts != null && !F.isEmpty(acts.cacheStartRequests())) {
-for (ExchangeActions.CacheActionData actionData : 
acts.cacheStartRequests()) {
-int cacheId = CU.cacheId(actionData.request().cacheName());
-
-GridFutureAdapter old = idxRebuildFuts.put(cacheId, 
new GridFutureAdapter<>());
-
-if (old != null)
-old.onDone();
+if (acts != null) {
+if (!F.isEmpty(acts.cacheStartRequests())) {
+for (ExchangeActions.CacheActionData actionData : 
acts.cacheStartRequests())
+
prepareIndexRebuildFuture(CU.cacheId(actionData.request().cacheName()));
+}
+else if (acts.localJoinContext() != null && 
!F.isEmpty(acts.localJoinContext().caches())) {
+for (T2 
tup : acts.localJoinContext().caches())
+prepareIndexRebuildFuture(tup.get1().cacheId());
 }
 }
 }
 }
 
+/**
+ * Creates a new index rebuild future that should be completed later after 
exchange is done. The future
+ * has to be created before exchange is initialized to guarantee that we 
will capture a correct future
+ * after activation or restore completes.
+ * If there was an old future for the given ID, it will be completed.
+ *
+ * @param cacheId Cache ID.
+ */
+private void prepareIndexRebuildFuture(int cacheId) {
+GridFutureAdapter old = idxRebuildFuts.put(cacheId, new 
GridFutureAdapter<>());
+
+if (old != null)
+old.onDone();
+}
+
 /** {@inheritDoc} */
 @Override public void 
rebuildIndexesIfNeeded(GridDhtPartitionsExchangeFuture fut) {
 if (cctx.kernalContext().query().moduleEnabled()) {



[08/50] [abbrv] ignite git commit: ignite-2.4.0 Update version.

2018-02-09 Thread akuznetsov
ignite-2.4.0 Update version.


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

Branch: refs/heads/ignite-7485-2
Commit: 2e43749e7283965e94fdde9c30d687d8965c35eb
Parents: ebfab70
Author: Alexey Kuznetsov 
Authored: Thu Feb 1 15:22:53 2018 +0700
Committer: Alexey Kuznetsov 
Committed: Thu Feb 1 15:22:53 2018 +0700

--
 modules/web-console/frontend/app/services/Version.service.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/2e43749e/modules/web-console/frontend/app/services/Version.service.js
--
diff --git a/modules/web-console/frontend/app/services/Version.service.js 
b/modules/web-console/frontend/app/services/Version.service.js
index 22d0732..9bd9c7d 100644
--- a/modules/web-console/frontend/app/services/Version.service.js
+++ b/modules/web-console/frontend/app/services/Version.service.js
@@ -73,7 +73,7 @@ const compare = (a, b) => {
 
 export default class IgniteVersion {
 constructor() {
-this.webConsole = '2.2.0';
+this.webConsole = '2.4.0';
 
 this.supportedVersions = [
 {



[02/50] [abbrv] ignite git commit: IGNITE-7324 Failing hanging test

2018-02-09 Thread akuznetsov
IGNITE-7324 Failing hanging test


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

Branch: refs/heads/ignite-7485-2
Commit: 8a5446f96d007bbdcd57ea26533a8d41a1a1f88a
Parents: 53c0fd1
Author: Alexey Goncharuk 
Authored: Wed Jan 31 13:20:00 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Jan 31 13:20:00 2018 +0300

--
 .../cache/transactions/TxDeadlockDetectionNoHangsTest.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/8a5446f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
index 794c176..87d572d 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlockDetectionNoHangsTest.java
@@ -108,6 +108,8 @@ public class TxDeadlockDetectionNoHangsTest extends 
GridCommonAbstractTest {
  * @throws Exception If failed.
  */
 public void testNoHangsPessimistic() throws Exception {
+fail("https://issues.apache.org/jira/browse/IGNITE-7324";);
+
 
assertTrue(grid(0).context().cache().context().tm().deadlockDetectionEnabled());
 
 doTest(PESSIMISTIC);



[13/50] [abbrv] ignite git commit: IGNITE-7520 Provide util-methods to get baseline from context - Fixes #3431.

2018-02-09 Thread akuznetsov
IGNITE-7520 Provide util-methods to get baseline from context - Fixes #3431.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/ignite-7485-2
Commit: f92d20ebc4683be945aa0a89c1908119f519bdc1
Parents: f8d1674
Author: EdShangGG 
Authored: Thu Feb 1 16:34:05 2018 +0300
Committer: Alexey Goncharuk 
Committed: Thu Feb 1 16:34:05 2018 +0300

--
 .../ignite/internal/util/IgniteUtils.java   | 28 
 1 file changed, 28 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f92d20eb/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 548fb1b..1d80a9e 100755
--- 
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
@@ -10325,6 +10325,34 @@ public abstract class IgniteUtils {
 }
 
 /**
+ * @param ctx Context.
+ *
+ * @return instance of current baseline topology if it exists
+ */
+public static BaselineTopology getBaselineTopology(@NotNull 
GridKernalContext ctx) {
+return ctx.state().clusterState().baselineTopology();
+}
+
+
+/**
+ * @param cctx Context.
+ *
+ * @return instance of current baseline topology if it exists
+ */
+public static BaselineTopology getBaselineTopology(@NotNull 
GridCacheSharedContext cctx) {
+return getBaselineTopology(cctx.kernalContext());
+}
+
+/**
+ * @param cctx Context.
+ *
+ * @return instance of current baseline topology if it exists
+ */
+public static BaselineTopology getBaselineTopology(@NotNull 
GridCacheContext cctx) {
+return getBaselineTopology(cctx.kernalContext());
+}
+
+/**
  * @param addr pointer in memory
  * @param len how much byte to read (should divide 8)
  *



[37/50] [abbrv] ignite git commit: IGNITE-7508: Fix contention on system property access in GridKernalContextImpl::isDaemon(). This closes #3468.

2018-02-09 Thread akuznetsov
IGNITE-7508: Fix contention on system property access in 
GridKernalContextImpl::isDaemon(). This closes #3468.


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

Branch: refs/heads/ignite-7485-2
Commit: d2b41a08e2f6ce2913607f0fa13aa4993b801798
Parents: 63f6b1f
Author: Andrey V. Mashenkov 
Authored: Wed Feb 7 18:25:25 2018 +0300
Committer: Andrey V. Mashenkov 
Committed: Wed Feb 7 18:25:25 2018 +0300

--
 .../ignite/internal/GridKernalContextImpl.java  | 31 
 .../apache/ignite/internal/IgniteKernal.java|  2 +-
 2 files changed, 20 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/d2b41a08/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 3f064fa..aaf2e8f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -34,6 +34,7 @@ import java.util.concurrent.ExecutorService;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.managers.checkpoint.GridCheckpointManager;
@@ -597,7 +598,7 @@ public class GridKernalContextImpl implements 
GridKernalContext, Externalizable
 else if (comp instanceof GridInternalSubscriptionProcessor)
 internalSubscriptionProc = (GridInternalSubscriptionProcessor)comp;
 else if (!(comp instanceof DiscoveryNodeValidationProcessor
-|| comp instanceof PlatformPluginProcessor))
+|| comp instanceof PlatformPluginProcessor))
 assert (comp instanceof GridPluginComponent) : "Unknown manager 
class: " + comp.getClass();
 
 if (addToList)
@@ -623,15 +624,19 @@ public class GridKernalContextImpl implements 
GridKernalContext, Externalizable
 return ((IgniteKernal)grid).isStopping();
 }
 
+/** */
+@Nullable private ClusterNode localNode() {
+if (locNode == null && discoMgr != null)
+locNode = discoMgr.localNode();
+
+return locNode;
+}
+
 /** {@inheritDoc} */
 @Override public UUID localNodeId() {
-if (locNode != null)
-return locNode.id();
+ClusterNode locNode0 = localNode();
 
-if (discoMgr != null)
-locNode = discoMgr.localNode();
-
-return locNode != null ? locNode.id() : config().getNodeId();
+return locNode0 != null ? locNode0.id() : config().getNodeId();
 }
 
 /** {@inheritDoc} */
@@ -886,7 +891,10 @@ public class GridKernalContextImpl implements 
GridKernalContext, Externalizable
 
 /** {@inheritDoc} */
 @Override public boolean isDaemon() {
-return config().isDaemon() || 
"true".equalsIgnoreCase(System.getProperty(IGNITE_DAEMON));
+ClusterNode locNode0 = localNode();
+
+return locNode0 != null ? locNode0.isDaemon() :
+(config().isDaemon() || 
IgniteSystemProperties.getBoolean(IGNITE_DAEMON));
 }
 
 /** {@inheritDoc} */
@@ -1068,10 +1076,9 @@ public class GridKernalContextImpl implements 
GridKernalContext, Externalizable
 
 /** {@inheritDoc} */
 @Override public boolean clientDisconnected() {
-if (locNode == null)
-locNode = discoMgr != null ? discoMgr.localNode() : null;
+ClusterNode locNode0 = localNode();
 
-return locNode != null ? (locNode.isClient() && disconnected) : false;
+return locNode0 != null ? (locNode0.isClient() && disconnected) : 
false;
 }
 
 /** {@inheritDoc} */
@@ -1091,7 +1098,7 @@ public class GridKernalContextImpl implements 
GridKernalContext, Externalizable
 this.disconnected = disconnected;
 }
 
-/**{@inheritDoc}*/
+/** {@inheritDoc} */
 @Override public PdsFoldersResolver pdsFolderResolver() {
 return pdsFolderRslvr;
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/d2b41a08/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

[33/50] [abbrv] ignite git commit: IGNITE-6917: Implemented SQL COPY command

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/25d38cc9/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index ba5d576..5d85f0d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -815,6 +815,7 @@
 
**/*index*.md
 
**/*.timestamp
 **/*.iml
+**/*.csv
 
**/pom-installed.xml
 
**/keystore/*.jks
 
**/keystore/*.pem
@@ -842,9 +843,7 @@
 
**/books/*.txt
 
src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt
 
examples/src/main/java/org/apache/ignite/examples/streaming/wordcount/*.txt
-
src/main/resources/person.csv
 
**/resources/datasets/**/*
-
examples/src/main/resources/person.csv
 
src/main/java/org/jetbrains/annotations/*.java
 
dev-tools/IGNITE-*.patch
 
dev-tools/.gradle/**/*



[35/50] [abbrv] ignite git commit: IGNITE-6917: Implemented SQL COPY command

2018-02-09 Thread akuznetsov
IGNITE-6917: Implemented SQL COPY command

This closes #3419


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

Branch: refs/heads/ignite-7485-2
Commit: 25d38cc98c4ca098679d69ad90fc8bed66e6916d
Parents: faf50f1
Author: gg-shq 
Authored: Wed Feb 7 14:28:04 2018 +0300
Committer: Igor Sapego 
Committed: Wed Feb 7 14:30:39 2018 +0300

--
 .../internal/jdbc2/JdbcBulkLoadSelfTest.java| 185 ++
 .../ignite/jdbc/JdbcErrorsAbstractSelfTest.java |   2 +-
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |  14 +
 .../thin/JdbcThinBulkLoadAbstractSelfTest.java  | 601 +++
 ...inBulkLoadAtomicPartitionedNearSelfTest.java |  39 ++
 ...bcThinBulkLoadAtomicPartitionedSelfTest.java |  39 ++
 ...dbcThinBulkLoadAtomicReplicatedSelfTest.java |  39 ++
 ...oadTransactionalPartitionedNearSelfTest.java |  39 ++
 ...ulkLoadTransactionalPartitionedSelfTest.java |  39 ++
 ...BulkLoadTransactionalReplicatedSelfTest.java |  39 ++
 .../JdbcThinDynamicIndexAbstractSelfTest.java   |   1 -
 .../clients/src/test/resources/bulkload0.csv|   0
 .../clients/src/test/resources/bulkload1.csv|   1 +
 .../clients/src/test/resources/bulkload2.csv|   2 +
 .../src/test/resources/bulkload2_utf.csv|   2 +
 .../cache/query/BulkLoadContextCursor.java  |  97 +++
 .../internal/jdbc/thin/JdbcThinStatement.java   |  68 ++-
 .../ignite/internal/jdbc2/JdbcQueryTask.java|  12 +-
 .../bulkload/BulkLoadAckClientParameters.java   |  92 +++
 .../bulkload/BulkLoadCacheWriter.java   |  31 +
 .../processors/bulkload/BulkLoadCsvFormat.java  | 159 +
 .../processors/bulkload/BulkLoadCsvParser.java  |  65 ++
 .../processors/bulkload/BulkLoadFormat.java |  33 +
 .../processors/bulkload/BulkLoadParser.java |  61 ++
 .../processors/bulkload/BulkLoadProcessor.java  | 104 
 .../bulkload/BulkLoadStreamerWriter.java|  65 ++
 .../bulkload/pipeline/CharsetDecoderBlock.java  | 132 
 .../pipeline/CsvLineProcessorBlock.java |  70 +++
 .../bulkload/pipeline/LineSplitterBlock.java|  72 +++
 .../bulkload/pipeline/PipelineBlock.java|  66 ++
 .../bulkload/pipeline/StrListAppenderBlock.java |  52 ++
 .../odbc/jdbc/JdbcBulkLoadAckResult.java| 111 
 .../odbc/jdbc/JdbcBulkLoadBatchRequest.java | 183 ++
 .../odbc/jdbc/JdbcBulkLoadProcessor.java| 144 +
 .../processors/odbc/jdbc/JdbcRequest.java   |   7 +
 .../odbc/jdbc/JdbcRequestHandler.java   |  90 ++-
 .../processors/odbc/jdbc/JdbcResult.java|   8 +
 .../apache/ignite/internal/sql/SqlKeyword.java  |  15 +
 .../apache/ignite/internal/sql/SqlParser.java   |  18 +-
 .../sql/command/SqlBulkLoadCommand.java | 273 +
 .../internal/sql/SqlParserBulkLoadSelfTest.java |  70 +++
 .../query/h2/DmlStatementsProcessor.java|  99 +++
 .../processors/query/h2/IgniteH2Indexing.java   |  35 +-
 .../query/h2/ddl/DdlStatementsProcessor.java|   2 +
 .../processors/query/h2/dml/UpdateMode.java |  11 +-
 .../processors/query/h2/dml/UpdatePlan.java |  20 +-
 .../query/h2/dml/UpdatePlanBuilder.java |  86 +++
 .../IgniteCacheQuerySelfTestSuite.java  |   2 +
 parent/pom.xml  |   3 +-
 49 files changed, 3361 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/25d38cc9/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java
--
diff --git 
a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java
new file mode 100644
index 000..d9506cf
--- /dev/null
+++ 
b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBulkLoadSelfTest.java
@@ -0,0 +1,185 @@
+/*
+ * 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
+ * li

[49/50] [abbrv] ignite git commit: IGNITE-7438: LSQR solver for Linear Regression

2018-02-09 Thread akuznetsov
IGNITE-7438: LSQR solver for Linear Regression

this closes #3494


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

Branch: refs/heads/ignite-7485-2
Commit: 2f330a1cd1430a198ac0ddd81075ef20ff1e7316
Parents: 64c9f50
Author: dmitrievanthony 
Authored: Fri Feb 9 14:17:27 2018 +0300
Committer: Yury Babak 
Committed: Fri Feb 9 14:17:27 2018 +0300

--
 ...tedLinearRegressionExampleWithQRTrainer.java | 136 
 ...edLinearRegressionExampleWithSGDTrainer.java | 137 
 ...dLinearRegressionWithLSQRTrainerExample.java | 170 ++
 ...tedLinearRegressionWithQRTrainerExample.java | 136 
 ...edLinearRegressionWithSGDTrainerExample.java | 137 
 .../org/apache/ignite/ml/DatasetTrainer.java|  42 +++
 .../main/java/org/apache/ignite/ml/Trainer.java |   2 +
 .../ml/math/isolve/IterativeSolverResult.java   |  64 
 .../LinSysPartitionDataBuilderOnHeap.java   |  85 +
 .../math/isolve/LinSysPartitionDataOnHeap.java  |  75 +
 .../ml/math/isolve/lsqr/AbstractLSQR.java   | 333 +++
 .../ignite/ml/math/isolve/lsqr/LSQROnHeap.java  | 102 ++
 .../math/isolve/lsqr/LSQRPartitionContext.java  |  41 +++
 .../ignite/ml/math/isolve/lsqr/LSQRResult.java  | 140 
 .../ml/math/isolve/lsqr/package-info.java   |  22 ++
 .../ignite/ml/math/isolve/package-info.java |  22 ++
 .../linear/LinearRegressionLSQRTrainer.java |  70 
 .../org/apache/ignite/ml/trainers/Trainer.java  |   2 +
 .../ignite/ml/math/MathImplLocalTestSuite.java  |   4 +-
 .../ml/math/isolve/lsqr/LSQROnHeapTest.java | 134 
 .../ml/regressions/RegressionsTestSuite.java|   4 +-
 .../linear/LinearRegressionLSQRTrainerTest.java | 124 +++
 22 files changed, 1707 insertions(+), 275 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/2f330a1c/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
 
b/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
deleted file mode 100644
index 98ff2a2..000
--- 
a/examples/src/main/java/org/apache/ignite/examples/ml/regression/linear/DistributedLinearRegressionExampleWithQRTrainer.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.examples.ml.regression.linear;
-
-import java.util.Arrays;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.Ignition;
-import 
org.apache.ignite.examples.ml.math.matrix.SparseDistributedMatrixExample;
-import org.apache.ignite.ml.Trainer;
-import org.apache.ignite.ml.math.Matrix;
-import org.apache.ignite.ml.math.Vector;
-import org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix;
-import org.apache.ignite.ml.math.impls.vector.SparseDistributedVector;
-import org.apache.ignite.ml.regressions.linear.LinearRegressionModel;
-import org.apache.ignite.ml.regressions.linear.LinearRegressionQRTrainer;
-import org.apache.ignite.thread.IgniteThread;
-
-/**
- * Run linear regression model over distributed matrix.
- *
- * @see LinearRegressionQRTrainer
- */
-public class DistributedLinearRegressionExampleWithQRTrainer {
-/** */
-private static final double[][] data = {
-{8, 78, 284, 9.10381, 109},
-{9.30191, 68, 433, 8.69809, 144},
-{7.5, 70, 739, 7.19809, 113},
-{8.89619, 96, 1792, 8.89619, 97},
-{10.1981, 74, 477, 8.30191, 206},
-{8.30191, 111, 362, 10.8962, 124},
-{8.80191, 77, 671, 10, 152},
-{8.80191, 168, 636, 9.10381, 162},
-{10.69

[27/50] [abbrv] ignite git commit: IGNITE-7375: Right cleanup after training.

2018-02-09 Thread akuznetsov
IGNITE-7375: Right cleanup after training.

this closes #3478


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

Branch: refs/heads/ignite-7485-2
Commit: 50213a0aede8eaa383a0af558d2cb14ce563aeb1
Parents: a1922d7
Author: Artem Malykh 
Authored: Tue Feb 6 20:40:47 2018 +0300
Committer: Yury Babak 
Committed: Tue Feb 6 20:40:47 2018 +0300

--
 .../ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java  | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/50213a0a/modules/ml/src/main/java/org/apache/ignite/ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java
--
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java
index 8e97d87..333afcc 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/nn/trainers/distributed/MLPGroupUpdateTrainer.java
@@ -22,7 +22,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Set;
 import java.util.UUID;
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.Ignition;
@@ -324,7 +326,9 @@ public class MLPGroupUpdateTrainer 
extends
 
 /** {@inheritDoc} */
 @Override protected void cleanup(MLPGroupUpdateTrainerLocalContext locCtx) 
{
-
+
MLPGroupUpdateTrainerDataCache.getOrCreate(ignite).remove(locCtx.trainingUUID());
+Set> toRmv = 
MLPCache.allKeys(locCtx.parallelTrainingsCnt(), 
locCtx.trainingUUID()).collect(Collectors.toSet());
+MLPCache.getOrCreate(ignite).removeAll(toRmv);
 }
 
 /**



[30/50] [abbrv] ignite git commit: IGNITE-7533 Throttle writing threads according to fsync progress - Fixes #3437.

2018-02-09 Thread akuznetsov
IGNITE-7533 Throttle writing threads according to fsync progress - Fixes #3437.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/ignite-7485-2
Commit: b50aa5eb0b3d8a641b574401b8d79e3ca612756a
Parents: e8bd98d
Author: dpavlov 
Authored: Wed Feb 7 10:37:51 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Feb 7 10:37:51 2018 +0300

--
 .../GridCacheDatabaseSharedManager.java |  86 ++-
 .../pagemem/IntervalBasedMeasurement.java   | 304 +++
 .../persistence/pagemem/PageMemoryImpl.java | 108 +++-
 .../pagemem/PagesWriteSpeedBasedThrottle.java   | 519 +++
 .../persistence/pagemem/PagesWriteThrottle.java |  21 +-
 .../pagemem/PagesWriteThrottlePolicy.java   |  39 ++
 ...gniteCheckpointDirtyPagesForLowLoadTest.java |  21 +-
 .../checkpoint/IgniteMassLoadSandboxTest.java   | 515 ++
 .../db/checkpoint/ProgressWatchdog.java | 495 ++
 .../pagemem/BPlusTreePageMemoryImplTest.java|   2 +-
 .../BPlusTreeReuseListPageMemoryImplTest.java   |   2 +-
 .../pagemem/IgniteThrottlingUnitTest.java   | 270 ++
 .../pagemem/IndexStoragePageMemoryImplTest.java |   2 +-
 .../pagemem/PageMemoryImplNoLoadTest.java   |   2 +-
 .../persistence/pagemem/PageMemoryImplTest.java |   2 +-
 .../ignite/testsuites/IgnitePdsTestSuite.java   |   1 -
 .../testsuites/IgnitePdsUnitTestSuite.java  |  31 ++
 .../testsuites/IgniteReproducingSuite.java  |   6 +-
 18 files changed, 2362 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b50aa5eb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 5dc81c5..bd80ec8 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -55,6 +55,7 @@ import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import java.util.concurrent.atomic.LongAdder;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -129,7 +130,6 @@ import 
org.apache.ignite.internal.processors.cache.persistence.tree.io.PageParti
 import 
org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer;
 import 
org.apache.ignite.internal.processors.cache.persistence.wal.crc.PureJavaCrc32;
 import org.apache.ignite.internal.processors.port.GridPortRecord;
-import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.GridMultiCollectionWrapper;
 import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.IgniteUtils;
@@ -156,6 +156,7 @@ import org.apache.ignite.thread.IgniteThread;
 import org.apache.ignite.thread.IgniteThreadPoolExecutor;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+import org.jsr166.ConcurrentLinkedHashMap;
 
 import static java.nio.file.StandardOpenOption.READ;
 import static 
org.apache.ignite.IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE;
@@ -355,7 +356,13 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 /** Counter for written checkpoint pages. Not null only if checkpoint is 
running. */
 private volatile AtomicInteger writtenPagesCntr = null;
 
-/** Number of pages in current checkpoint. */
+/** Counter for fsynced checkpoint pages. Not null only if checkpoint is 
running. */
+private volatile AtomicInteger syncedPagesCntr = null;
+
+/** Counter for evictted checkpoint pages. Not null only if checkpoint is 
running. */
+private volatile AtomicInteger evictedPagesCntr = null;
+
+/** Number of pages in current checkpoint at the beginning of checkpoint. 
*/
 private volatile int currCheckpointPagesCnt;
 
 /** */
@@ -933,10 +940,18 @@ public class GridCacheDatabaseSharedManager extends 
IgniteCacheDatabaseSharedMan
 chpBufSize = cacheSiz

[38/50] [abbrv] ignite git commit: IGNITE-7586: Added COPY command into the JDBC example.

2018-02-09 Thread akuznetsov
IGNITE-7586: Added COPY command into the JDBC example.

This closes #3485


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

Branch: refs/heads/ignite-7485-2
Commit: ce7c1478ff19e2cd4becfda855246745b248b287
Parents: d2b41a0
Author: gg-shq 
Authored: Wed Feb 7 18:31:27 2018 +0300
Committer: Igor Sapego 
Committed: Wed Feb 7 18:32:31 2018 +0300

--
 .../ignite/examples/sql/SqlJdbcCopyExample.java | 107 +++
 examples/src/main/resources/cityBulkLoad.csv|   3 +
 examples/src/main/resources/personBulkLoad.csv  |   4 +
 3 files changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/ce7c1478/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java
--
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java 
b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java
new file mode 100644
index 000..9ac6419
--- /dev/null
+++ 
b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java
@@ -0,0 +1,107 @@
+/*
+ * 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.examples.sql;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import org.apache.ignite.examples.ExampleNodeStartup;
+import org.apache.ignite.internal.util.IgniteUtils;
+
+/**
+ * This example demonstrates usage of COPY command via Ignite thin JDBC driver.
+ * 
+ * Ignite nodes must be started in separate process using {@link 
ExampleNodeStartup} before running this example.
+ */
+public class SqlJdbcCopyExample {
+/**
+ * Executes JDBC COPY example.
+ *
+ * @param args Command line arguments, none required.
+ * @throws Exception If example execution failed.
+ */
+public static void main(String[] args) throws Exception {
+print("JDBC COPY example started.");
+
+// Open JDBC connection
+try (Connection conn = 
DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/")) {
+print("Connected to server.");
+
+// Create database objects.
+try (Statement stmt = conn.createStatement()) {
+// Create reference City table based on REPLICATED template.
+stmt.executeUpdate("CREATE TABLE city (id LONG PRIMARY KEY, 
name VARCHAR) " +
+"WITH \"template=replicated\"");
+
+// Create table based on PARTITIONED template with one backup.
+stmt.executeUpdate("CREATE TABLE person (id LONG, name 
VARCHAR, city_id LONG, " +
+"PRIMARY KEY (id, city_id)) WITH \"backups=1, 
affinity_key=city_id\"");
+}
+
+print("Created database objects.");
+
+// Populate City via COPY command with records from 
cityBulkLoad.csv
+try (Statement stmt = conn.createStatement()) {
+stmt.executeUpdate("COPY FROM \"" +
+
IgniteUtils.resolveIgnitePath("examples/src/main/resources/cityBulkLoad.csv") + 
"\" " +
+"INTO City (id, name) FORMAT CSV");
+}
+
+// Populate Person via COPY command with records from 
personBulkLoad.csv
+try (Statement stmt = conn.createStatement()) {
+stmt.executeUpdate("COPY FROM \"" +
+
IgniteUtils.resolveIgnitePath("examples/src/main/resources/personBulkLoad.csv") 
+ "\" " +
+"INTO Person (id, name, city_id) FORMAT CSV");
+}
+
+print("Populated data via COPY.");
+
+// Get data.
+try (Statement stmt = conn.createStatement()) {
+try (ResultSet rs =
+stmt.executeQuery("SELECT p.name, c.name FROM Person p 
INNER JOIN City c on

[43/50] [abbrv] ignite git commit: IGNITE-7346 Enable Ignite cache events per cache

2018-02-09 Thread akuznetsov
IGNITE-7346 Enable Ignite cache events per cache

Signed-off-by: Anton Vinogradov 


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

Branch: refs/heads/ignite-7485-2
Commit: b2531569d42aae871b09728a6dd7a850f3cbe2b3
Parents: 42161cd
Author: Aleksey Plekhanov 
Authored: Thu Feb 8 19:51:35 2018 +0300
Committer: Anton Vinogradov 
Committed: Thu Feb 8 19:51:35 2018 +0300

--
 .../configuration/CacheConfiguration.java   | 28 +++
 .../processors/cache/CacheGroupContext.java | 48 ++--
 .../processors/cache/GridCacheEventManager.java |  3 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  2 +-
 .../cache/query/GridCacheQueryManager.java  | 18 ++---
 .../continuous/CacheContinuousQueryHandler.java |  4 +-
 .../continuous/CacheContinuousQueryManager.java |  4 +-
 .../processors/query/GridQueryProcessor.java| 10 +--
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  8 ++
 .../distributed/GridCacheEventAbstractTest.java | 82 +++-
 ...ridCachePartitionedUnloadEventsSelfTest.java | 25 --
 ...ridCacheReplicatedEventDisabledSelfTest.java | 75 ++
 .../GridCacheReplicatedPreloadSelfTest.java |  7 ++
 .../testsuites/IgniteCacheTestSuite3.java   |  2 +
 .../query/h2/twostep/GridMapQueryExecutor.java  |  9 +--
 .../query/h2/twostep/MapQueryResult.java| 24 +++---
 .../query/h2/twostep/MapQueryResults.java   | 18 ++---
 .../cache/IgniteCacheAbstractQuerySelfTest.java | 54 ++---
 ...chePartitionedQueryEvtsDisabledSelfTest.java | 30 +++
 ...acheReplicatedQueryEvtsDisabledSelfTest.java | 30 +++
 .../IgniteCacheReplicatedQuerySelfTest.java | 25 ++
 .../IgniteCacheQuerySelfTestSuite.java  | 18 +++--
 .../ApiParity/CacheConfigurationParityTest.cs   |  3 +-
 23 files changed, 397 insertions(+), 130 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b2531569/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 3a40824..d41e687 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -181,6 +181,9 @@ public class CacheConfiguration extends 
MutableConfiguration {
 /** Default query parallelism. */
 public static final int DFLT_QUERY_PARALLELISM = 1;
 
+/** Default value for events disabled flag. */
+public static final boolean DFLT_EVENTS_DISABLED = false;
+
 /** Cache name. */
 private String name;
 
@@ -361,6 +364,9 @@ public class CacheConfiguration extends 
MutableConfiguration {
 /** Cache key configuration. */
 private CacheKeyConfiguration[] keyCfg;
 
+/** Events disabled. */
+private boolean evtsDisabled = DFLT_EVENTS_DISABLED;
+
 /** Empty constructor (all values are initialized to their defaults). */
 public CacheConfiguration() {
 /* No-op. */
@@ -453,6 +459,7 @@ public class CacheConfiguration extends 
MutableConfiguration {
 storeConcurrentLoadAllThreshold = 
cc.getStoreConcurrentLoadAllThreshold();
 maxQryIterCnt = cc.getMaxQueryIteratorsCount();
 sqlOnheapCache = cc.isSqlOnheapCacheEnabled();
+evtsDisabled = cc.isEventsDisabled();
 }
 
 /**
@@ -2184,6 +2191,27 @@ public class CacheConfiguration extends 
MutableConfiguration {
 }
 
 /**
+ * Checks whether events are disabled for this cache.
+ *
+ * @return Events disabled flag.
+ */
+public Boolean isEventsDisabled() {
+return evtsDisabled;
+}
+
+/**
+ * Sets events disabled flag.
+ *
+ * @param evtsDisabled Events disabled flag.
+ * @return {@code this} for chaining.
+ */
+public CacheConfiguration setEventsDisabled(boolean evtsDisabled) {
+this.evtsDisabled = evtsDisabled;
+
+return this;
+}
+
+/**
  * Gets cache key configuration.
  *
  * @return Cache key configuration.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b2531569/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGr

[48/50] [abbrv] ignite git commit: IGNITE-7438: LSQR solver for Linear Regression

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/2f330a1c/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
--
diff --git 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
new file mode 100644
index 000..4892ff8
--- /dev/null
+++ 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/isolve/lsqr/LSQROnHeapTest.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.ml.math.isolve.lsqr;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.ignite.ml.dataset.DatasetBuilder;
+import org.apache.ignite.ml.dataset.impl.local.LocalDatasetBuilder;
+import org.apache.ignite.ml.math.isolve.LinSysPartitionDataBuilderOnHeap;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static org.junit.Assert.assertArrayEquals;
+
+/**
+ * Tests for {@link LSQROnHeap}.
+ */
+@RunWith(Parameterized.class)
+public class LSQROnHeapTest {
+/** Parameters. */
+@Parameterized.Parameters(name = "Data divided on {0} partitions")
+public static Iterable data() {
+return Arrays.asList(
+new Integer[] {1},
+new Integer[] {2},
+new Integer[] {3},
+new Integer[] {5},
+new Integer[] {7},
+new Integer[] {100},
+new Integer[] {1000}
+);
+}
+
+/** Number of partitions. */
+@Parameterized.Parameter
+public int parts;
+
+/** Tests solving simple linear system. */
+@Test
+public void testSolveLinearSystem() {
+Map data = new HashMap<>();
+data.put(0, new double[]{3, 2, -1, 1});
+data.put(1, new double[]{2, -2, 4, -2});
+data.put(2, new double[]{-1, 0.5, -1, 0});
+
+DatasetBuilder datasetBuilder = new 
LocalDatasetBuilder<>(data, parts);
+
+LSQROnHeap lsqr = new LSQROnHeap<>(
+datasetBuilder,
+new LinSysPartitionDataBuilderOnHeap<>(
+(k, v) -> Arrays.copyOf(v, v.length - 1),
+(k, v) -> v[3],
+3
+)
+);
+
+LSQRResult res = lsqr.solve(0, 1e-12, 1e-12, 1e8, -1, false, null);
+
+assertArrayEquals(new double[]{1, -2, -2}, res.getX(), 1e-6);
+}
+
+/** Tests solving simple linear system with specified x0. */
+@Test
+public void testSolveLinearSystemWithX0() {
+Map data = new HashMap<>();
+data.put(0, new double[]{3, 2, -1, 1});
+data.put(1, new double[]{2, -2, 4, -2});
+data.put(2, new double[]{-1, 0.5, -1, 0});
+
+DatasetBuilder datasetBuilder = new 
LocalDatasetBuilder<>(data, parts);
+
+LSQROnHeap lsqr = new LSQROnHeap<>(
+datasetBuilder,
+new LinSysPartitionDataBuilderOnHeap<>(
+(k, v) -> Arrays.copyOf(v, v.length - 1),
+(k, v) -> v[3],
+3
+)
+);
+
+LSQRResult res = lsqr.solve(0, 1e-12, 1e-12, 1e8, -1, false,
+new double[] {999, 999, 999});
+
+assertArrayEquals(new double[]{1, -2, -2}, res.getX(), 1e-6);
+}
+
+/** Tests solving least squares problem. */
+@Test
+public void testSolveLeastSquares() throws Exception {
+Map data = new HashMap<>();
+data.put(0, new double[] {-1.0915526, 1.81983527, -0.91409478, 
0.70890712, -24.55724107});
+data.put(1, new double[] {-0.61072904, 0.37545517, 0.21705352, 
0.09516495, -26.57226867});
+data.put(2, new double[] {0.05485406, 0.88219898, -0.80584547, 
0.94668307, 61.80919728});
+data.put(3, new double[] {-0.24835094, -0.3453, -1.69984651, 
-1.45902635, -161.65525991});
+data.put(4, new double[] {0.63675392, 0.31675535, 0.38837437, 
-1.1221971, -14.46432611});
+data.put(5, new double[] {0.14194017, 2.18158997, -0.28397346, 
-0.62090588, -3.2122197});
+data.put(6, new double[] {-0.53487507, 1.4454797, 0.21570443, 
-0.54161422, -46.5469012});

[47/50] [abbrv] ignite git commit: IGNITE-6625: SSL support for thin JDBC: additional fix test; change error message

2018-02-09 Thread akuznetsov
IGNITE-6625: SSL support for thin JDBC: additional fix test; change error 
message


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

Branch: refs/heads/ignite-7485-2
Commit: 64c9f502a6c893aefffe82b27aa50ee275265953
Parents: 7c01452
Author: tledkov-gridgain 
Authored: Fri Feb 9 14:08:15 2018 +0300
Committer: Igor Sapego 
Committed: Fri Feb 9 14:10:08 2018 +0300

--
 .../client/ClientConnectorConfigurationValidationSelfTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/64c9f502/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
--
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
index 141f444..0729f77 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java
@@ -334,7 +334,7 @@ public class ClientConnectorConfigurationValidationSelfTest 
extends GridCommonAb
 
 return null;
 }
-}, SQLException.class, "Failed to connect to Ignite cluster");
+}, SQLException.class, "JDBC connection is not allowed, see 
ClientConnectorConfiguration.jdbcEnabled");
 }
 
 /**



[40/50] [abbrv] ignite git commit: IGNITE-425: Implementation of ContinuousQueryWithTransformer

2018-02-09 Thread akuznetsov
http://git-wip-us.apache.org/repos/asf/ignite/blob/a83f3038/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java
new file mode 100644
index 000..241dc2a
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerFailoverTest.java
@@ -0,0 +1,309 @@
+/*
+ * 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.query.continuous;
+
+import java.util.concurrent.CountDownLatch;
+import javax.cache.Cache;
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import javax.cache.event.CacheEntryEvent;
+import javax.cache.event.CacheEntryListenerException;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.IgniteClientDisconnectedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
+import org.apache.ignite.cache.query.ContinuousQueryWithTransformer;
+import 
org.apache.ignite.cache.query.ContinuousQueryWithTransformer.EventListener;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.lang.IgniteClosure;
+import org.apache.ignite.lang.IgniteOutClosure;
+import org.apache.ignite.resources.LoggerResource;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ */
+public class CacheContinuousWithTransformerFailoverTest extends 
GridCommonAbstractTest {
+/** */
+private static TcpDiscoveryIpFinder ipFinder = new 
TcpDiscoveryVmIpFinder(true);
+
+/** */
+private boolean client;
+
+/** {@inheritDoc} */
+@Override protected IgniteConfiguration getConfiguration(String 
igniteInstanceName) throws Exception {
+IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
+
+CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
+
+ccfg.setCacheMode(PARTITIONED);
+ccfg.setAtomicityMode(ATOMIC);
+ccfg.setWriteSynchronizationMode(FULL_SYNC);
+
+cfg.setCacheConfiguration(ccfg);
+cfg.setClientMode(client);
+
+return cfg;
+}
+
+/** {@inheritDoc} */
+@Override protected void afterTest() throws Exception {
+super.afterTest();
+
+stopAllGrids();
+}
+
+/**
+ * @throws Exception If failed.
+ */
+public void testServerNodeLeft() throws Exception {
+startGrids(3);
+
+client = true;
+
+final int CLIENT_ID = 3;
+
+Ignite clnNode = startGrid(CLIENT_ID);
+
+client = false;
+
+IgniteOutClosure> cache =
+new IgniteOutClosure>() {
+int cnt = 0;
+
+@Override public IgniteCache apply() {
+++cnt;
+
+return grid(CLIENT_ID).cache(DEFAULT_CACHE_NAME);
+}
+};
+
+final CacheEventListener lsnr = new CacheEventListener();
+
+ContinuousQueryWithTransformer qry = new 
ContinuousQueryWithTransformer<>();
+
+qry.setLocalListener(lsnr);
+   

[50/50] [abbrv] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-7485-2

2018-02-09 Thread akuznetsov
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into 
ignite-7485-2


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

Branch: refs/heads/ignite-7485-2
Commit: 234488ede466fa1f19fcd7577386bace6d529867
Parents: 138ff50 2f330a1
Author: Alexey Kuznetsov 
Authored: Fri Feb 9 20:01:55 2018 +0700
Committer: Alexey Kuznetsov 
Committed: Fri Feb 9 20:01:55 2018 +0700

--
 bin/control.bat |4 +-
 bin/ignite.bat  |4 +-
 bin/ignitevisorcmd.bat  |4 +-
 bin/include/functions.sh|2 +-
 config/ignite-log4j2.xml|2 +-
 .../cluster/ClusterGroupExample.java|   99 --
 .../computegrid/cluster/package-info.java   |   22 -
 .../examples/ml/MLExamplesCommonArgs.java   |   31 +
 .../AlgorithmSpecificDatasetExample.java|  197 +++
 .../ml/dataset/CacheBasedDatasetExample.java|   90 ++
 .../ml/dataset/LocalDatasetExample.java |   84 ++
 .../examples/ml/dataset/model/Person.java   |   58 +
 .../examples/ml/dataset/model/package-info.java |   22 +
 .../examples/ml/dataset/package-info.java   |   22 +
 .../KNNClassificationExample.java   |   17 +-
 .../ignite/examples/ml/knn/datasets/README.md   |2 -
 .../ml/knn/datasets/cleared_machines.txt|  209 ---
 .../ignite/examples/ml/knn/datasets/iris.txt|  150 --
 .../ml/knn/regression/KNNRegressionExample.java |   18 +-
 .../ml/preprocessing/NormalizationExample.java  |  109 ++
 .../examples/ml/preprocessing/package-info.java |   22 +
 ...tedLinearRegressionExampleWithQRTrainer.java |  136 --
 ...edLinearRegressionExampleWithSGDTrainer.java |  137 --
 ...dLinearRegressionWithLSQRTrainerExample.java |  170 +++
 ...tedLinearRegressionWithQRTrainerExample.java |  136 ++
 ...edLinearRegressionWithSGDTrainerExample.java |  137 ++
 .../ml/svm/SVMBinaryClassificationExample.java  |  134 ++
 .../examples/ml/trees/DecisionTreesExample.java |  354 +
 .../ignite/examples/ml/trees/MNISTExample.java  |  261 
 .../ignite/examples/sql/SqlJdbcCopyExample.java |  107 ++
 examples/src/main/resources/cityBulkLoad.csv|3 +
 examples/src/main/resources/datasets/README.md  |2 +
 .../resources/datasets/cleared_machines.txt |  209 +++
 examples/src/main/resources/datasets/iris.txt   |  150 ++
 .../src/main/resources/datasets/titanic.txt | 1309 ++
 examples/src/main/resources/person.json |   10 +
 examples/src/main/resources/personBulkLoad.csv  |4 +
 .../examples/ScalarSnowflakeSchemaExample.scala |4 +-
 .../spark/IgniteDataFrameWriteExample.scala |  179 +++
 .../testsuites/IgniteExamplesMLTestSuite.java   |5 +-
 .../spark/examples/IgniteDataFrameSelfTest.java |9 +
 .../jmh/notify/JmhWaitStategyBenchmark.java |7 +-
 .../store/cassandra/CassandraCacheStore.java|3 +-
 .../cassandra/common/PropertyMappingHelper.java |7 +-
 .../cassandra/session/CassandraSessionImpl.java |3 +-
 .../ignite/tests/load/PersonGenerator.java  |2 +-
 .../org/apache/ignite/tests/pojos/Person.java   |   12 +-
 .../apache/ignite/tests/pojos/SimplePerson.java |8 +-
 .../apache/ignite/tests/utils/TestsHelper.java  |4 +-
 .../internal/jdbc2/JdbcBulkLoadSelfTest.java|  185 +++
 .../ignite/jdbc/JdbcErrorsAbstractSelfTest.java |2 +-
 .../jdbc/suite/IgniteJdbcDriverTestSuite.java   |   16 +
 .../thin/JdbcThinBulkLoadAbstractSelfTest.java  |  601 
 ...inBulkLoadAtomicPartitionedNearSelfTest.java |   39 +
 ...bcThinBulkLoadAtomicPartitionedSelfTest.java |   39 +
 ...dbcThinBulkLoadAtomicReplicatedSelfTest.java |   39 +
 ...oadTransactionalPartitionedNearSelfTest.java |   39 +
 ...ulkLoadTransactionalPartitionedSelfTest.java |   39 +
 ...BulkLoadTransactionalReplicatedSelfTest.java |   39 +
 .../jdbc/thin/JdbcThinConnectionSSLTest.java|  479 +++
 .../jdbc/thin/JdbcThinConnectionSelfTest.java   |   36 +-
 .../JdbcThinDynamicIndexAbstractSelfTest.java   |1 -
 .../jdbc/thin/JdbcThinErrorsSelfTest.java   |2 +-
 .../clients/src/test/resources/bulkload0.csv|0
 .../clients/src/test/resources/bulkload1.csv|1 +
 .../clients/src/test/resources/bulkload2.csv|2 +
 .../src/test/resources/bulkload2_utf.csv|2 +
 .../apache/ignite/IgniteSystemProperties.java   |   18 +
 .../cache/eviction/AbstractEvictionPolicy.java  |4 +-
 .../igfs/IgfsPerBlockLruEvictionPolicy.java |4 +-
 .../eviction/sorted/SortedEvictionPolicy.java   |4 +-
 .../cache/query/AbstractContinuousQuery.java|  202 +++
 .../cache/query/BulkLoadContextCursor.java  |   97 ++
 .../ign

[39/50] [abbrv] ignite git commit: IGNITE-7639 Fixed NPE

2018-02-09 Thread akuznetsov
IGNITE-7639 Fixed NPE


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

Branch: refs/heads/ignite-7485-2
Commit: c917327b74b3dbcb65b961277f5d2c99a71b7a8a
Parents: ce7c147
Author: Alexey Goncharuk 
Authored: Wed Feb 7 21:10:32 2018 +0300
Committer: Alexey Goncharuk 
Committed: Wed Feb 7 21:10:32 2018 +0300

--
 .../cluster/DiscoveryDataClusterState.java  |  41 +++-
 .../IgniteClusterActivateDeactivateTest.java| 222 ---
 2 files changed, 128 insertions(+), 135 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/c917327b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
index dea2ce7..b022754 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
@@ -28,22 +28,36 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * Discovery data related to cluster state.
+ * A pojo-object representing current cluster global state. The state includes 
cluster active flag and cluster
+ * baseline topology.
+ * 
+ * This object also captures a transitional cluster state, when one or more 
fields are changing. In this case,
+ * a {@code transitionReqId} field is set to a non-null value and {@code 
prevState} captures previous cluster state.
+ * A joining node catching the cluster in an intermediate state will observe 
{@code transitionReqId} field to be
+ * non-null, however the {@code prevState} will not be sent to the joining 
node.
+ *
+ * TODO https://issues.apache.org/jira/browse/IGNITE-7640 This class must be 
immutable, transitionRes must be set by calling finish().
  */
 public class DiscoveryDataClusterState implements Serializable {
 /** */
 private static final long serialVersionUID = 0L;
 
-/** */
+/** Flag indicating if the cluster in in active state. */
 private final boolean active;
 
-/** */
+/** Current cluster baseline topology. */
 @Nullable private final BaselineTopology baselineTopology;
 
-/** */
+/**
+ * Transition request ID. Set to a non-null value if the cluster is 
changing it's state.
+ * The ID is assigned on the initiating node.
+ */
 private final UUID transitionReqId;
 
-/** Topology version for state change exchange. */
+/**
+ * Topology version in the cluster when state change request was received 
by the coordinator.
+ * The exchange fired for the cluster state change will be on version 
{@code transitionTopVer.nextMinorVersion()}.
+ */
 @GridToStringInclude
 private final AffinityTopologyVersion transitionTopVer;
 
@@ -51,13 +65,18 @@ public class DiscoveryDataClusterState implements 
Serializable {
 @GridToStringExclude
 private final Set transitionNodes;
 
-/** Local flag for state transition result (global state is updated 
asynchronously by custom message). */
+/**
+ * Local flag for state transition active state result (global state is 
updated asynchronously by custom message),
+ * {@code null} means that state change is not completed yet.
+ */
 private transient volatile Boolean transitionRes;
 
-/** */
+/**
+ * Previous cluster state if this state is a transition state and it was 
not received by a joining node.
+ */
 private transient DiscoveryDataClusterState prevState;
 
-/** */
+/** Transition result error. */
 private transient volatile Exception transitionError;
 
 /**
@@ -86,6 +105,7 @@ public class DiscoveryDataClusterState implements 
Serializable {
 assert transitionReqId != null;
 assert transitionTopVer != null;
 assert !F.isEmpty(transitionNodes) : transitionNodes;
+assert prevState != null;
 
 return new DiscoveryDataClusterState(
 prevState,
@@ -156,7 +176,7 @@ public class DiscoveryDataClusterState implements 
Serializable {
  * @return {@code True} if cluster active state change is in progress, 
{@code false} otherwise.
  */
 public boolean activeStateChanging() {
-return transition() && active != prevState.active;
+return transition() && (prevState == null || (prevState.active !

ignite git commit: IGNITE-7540 Prevent page memory metadata corruption during checkpoint and group destroying. - Fixes #3490.

2018-02-09 Thread agoncharuk
Repository: ignite
Updated Branches:
  refs/heads/master 2f330a1cd -> bf5131fa4


IGNITE-7540 Prevent page memory metadata corruption during checkpoint and group 
destroying. - Fixes #3490.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/master
Commit: bf5131fa40706e1538a69de1db99025a2ed72a41
Parents: 2f330a1
Author: Pavel Kovalenko 
Authored: Fri Feb 9 16:55:15 2018 +0300
Committer: Alexey Goncharuk 
Committed: Fri Feb 9 16:55:15 2018 +0300

--
 .../processors/cache/GridCacheProcessor.java|  19 +++
 ...nitePdsCacheDestroyDuringCheckpointTest.java | 161 +++
 .../IgnitePdsWithIndexingCoreTestSuite.java |   2 +
 3 files changed, 182 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/bf5131fa/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 1561f25..ec456e1 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
@@ -89,6 +89,7 @@ import 
org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter;
 import org.apache.ignite.internal.processors.cache.local.GridLocalCache;
 import 
org.apache.ignite.internal.processors.cache.local.atomic.GridLocalAtomicCache;
 import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
+import 
org.apache.ignite.internal.processors.cache.persistence.DbCheckpointListener;
 import 
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
 import 
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
 import 
org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
@@ -2232,6 +2233,24 @@ public class GridCacheProcessor extends 
GridProcessorAdapter {
 }
 }
 
+sharedCtx.database().checkpointReadLock();
+
+try {
+// Do not invoke checkpoint listeners for groups are going to 
be destroyed to prevent metadata corruption.
+for (ExchangeActions.CacheGroupActionData action : 
exchActions.cacheGroupsToStop()) {
+Integer groupId = action.descriptor().groupId();
+CacheGroupContext grp = cacheGrps.get(groupId);
+
+if (grp != null && grp.persistenceEnabled() && 
sharedCtx.database() instanceof GridCacheDatabaseSharedManager) {
+GridCacheDatabaseSharedManager mngr = 
(GridCacheDatabaseSharedManager) sharedCtx.database();
+mngr.removeCheckpointListener((DbCheckpointListener) 
grp.offheap());
+}
+}
+}
+finally {
+sharedCtx.database().checkpointReadUnlock();
+}
+
 List> stoppedGroups = 
new ArrayList<>();
 
 for (ExchangeActions.CacheGroupActionData action : 
exchActions.cacheGroupsToStop()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bf5131fa/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java
--
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java
new file mode 100644
index 000..72f73aa
--- /dev/null
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheDestroyDuringCheckpointTest.java
@@ -0,0 +1,161 @@
+/*
+ * 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 applicab

ignite git commit: IGNITE-7476 Avoid NPE during metrics gathering leading to discovery thread failure. - Fixes #3448.

2018-02-09 Thread agoncharuk
Repository: ignite
Updated Branches:
  refs/heads/master bf5131fa4 -> e36e383f1


IGNITE-7476 Avoid NPE during metrics gathering leading to discovery thread 
failure. - Fixes #3448.

Signed-off-by: Alexey Goncharuk 


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

Branch: refs/heads/master
Commit: e36e383f1dea725c44270fad6b40648d832b187a
Parents: bf5131f
Author: Ilya Kasnacheev 
Authored: Fri Feb 9 17:07:55 2018 +0300
Committer: Alexey Goncharuk 
Committed: Fri Feb 9 17:07:55 2018 +0300

--
 .../discovery/GridDiscoveryManager.java | 27 +++-
 .../datastreamer/DataStreamerImpl.java  |  4 +--
 2 files changed, 16 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/e36e383f/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 82d0f66..e731c52 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1059,25 +1059,28 @@ public class GridDiscoveryManager extends 
GridManagerAdapter {
 
 /** {@inheritDoc} */
 @Override public Map cacheMetrics() {
-Collection> caches = 
ctx.cache().internalCaches();
+try {
+Collection> caches = 
ctx.cache().internalCaches();
 
-if (F.isEmpty(caches))
-return Collections.emptyMap();
+if (!F.isEmpty(caches)) {
+Map metrics = 
U.newHashMap(caches.size());
 
-Map metrics = null;
+for (GridCacheAdapter cache : caches) {
+if (cache.context().isStatisticsEnabled() &&
+cache.context().started() &&
+
cache.context().affinity().affinityTopologyVersion().topologyVersion() > 0) {
 
-for (GridCacheAdapter cache : caches) {
-if (cache.context().statisticsEnabled() &&
-cache.context().started() &&
-
cache.context().affinity().affinityTopologyVersion().topologyVersion() > 0) {
-if (metrics == null)
-metrics = U.newHashMap(caches.size());
+metrics.put(cache.context().cacheId(), 
cache.localMetrics());
+}
+}
 
-metrics.put(cache.context().cacheId(), 
cache.localMetrics());
+return metrics;
 }
+} catch (Exception e) {
+U.warn(log, "Failed to compute cache metrics", e);
 }
 
-return metrics == null ? Collections.emptyMap() : metrics;
+return Collections.emptyMap();
 }
 };
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/e36e383f/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index 7d6a8d3..2b8a6c5 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -2132,9 +2132,7 @@ public class DataStreamerImpl implements 
IgniteDataStreamer, Delayed
 // No-op.
 }
 catch (IgniteCheckedException ex) {
-IgniteLogger log = cache.unwrap(Ignite.class).log();
-
-U.error(log, "Failed to set initial value for cache 
entry: " + e, ex);
+throw new IgniteException("Failed to set initial value 
for cache entry", ex);
 }
 finally {
 cctx.shared().database().checkpointReadUnlock();



ignite git commit: IGNITE-7476 Fixed compilation

2018-02-09 Thread agoncharuk
Repository: ignite
Updated Branches:
  refs/heads/master e36e383f1 -> d34107b8f


IGNITE-7476 Fixed compilation


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

Branch: refs/heads/master
Commit: d34107b8ff6e4765e02c83be1cd8c016f052c8ad
Parents: e36e383
Author: Alexey Goncharuk 
Authored: Fri Feb 9 20:32:38 2018 +0300
Committer: Alexey Goncharuk 
Committed: Fri Feb 9 20:32:38 2018 +0300

--
 .../ignite/internal/managers/discovery/GridDiscoveryManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/d34107b8/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index e731c52..7f844ea 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1066,7 +1066,7 @@ public class GridDiscoveryManager extends 
GridManagerAdapter {
 Map metrics = 
U.newHashMap(caches.size());
 
 for (GridCacheAdapter cache : caches) {
-if (cache.context().isStatisticsEnabled() &&
+if (cache.context().statisticsEnabled() &&
 cache.context().started() &&
 
cache.context().affinity().affinityTopologyVersion().topologyVersion() > 0) {
 



svn commit: r1823688 [1/2] - in /ignite/site/branches/ignite-7061: ./ arch/ features/ includes/ use-cases/caching/ use-cases/comparison/ use-cases/database/

2018-02-09 Thread dmagda
Author: dmagda
Date: Fri Feb  9 18:45:46 2018
New Revision: 1823688

URL: http://svn.apache.org/viewvc?rev=1823688&view=rev
Log:
reworked key-value apis page

Added:
ignite/site/branches/ignite-7061/features/key-value-store.html
  - copied, changed from r1823687, 
ignite/site/branches/ignite-7061/use-cases/database/key-value-store.html
ignite/site/branches/ignite-7061/use-cases/database/datagrid.html
  - copied, changed from r1823687, 
ignite/site/branches/ignite-7061/features/datagrid.html
Removed:
ignite/site/branches/ignite-7061/features/datagrid.html
ignite/site/branches/ignite-7061/use-cases/database/key-value-store.html
Modified:
ignite/site/branches/ignite-7061/.htaccess
ignite/site/branches/ignite-7061/arch/clustering.html
ignite/site/branches/ignite-7061/arch/memorycentric.html
ignite/site/branches/ignite-7061/download.html
ignite/site/branches/ignite-7061/features.html
ignite/site/branches/ignite-7061/features/datastructures.html
ignite/site/branches/ignite-7061/features/sql.html
ignite/site/branches/ignite-7061/features/transactions.html
ignite/site/branches/ignite-7061/includes/header.html
ignite/site/branches/ignite-7061/index.html
ignite/site/branches/ignite-7061/sitemap.xml
ignite/site/branches/ignite-7061/use-cases/caching/database-caching.html
ignite/site/branches/ignite-7061/use-cases/caching/jcache-provider.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-nosql.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-rdbms.html

ignite/site/branches/ignite-7061/use-cases/database/distributed-database.html
ignite/site/branches/ignite-7061/use-cases/database/in-memory-database.html
ignite/site/branches/ignite-7061/usecases.html
ignite/site/branches/ignite-7061/whatisignite-bk.html
ignite/site/branches/ignite-7061/whatisignite.html

Modified: ignite/site/branches/ignite-7061/.htaccess
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/.htaccess?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/.htaccess (original)
+++ ignite/site/branches/ignite-7061/.htaccess Fri Feb  9 18:45:46 2018
@@ -11,6 +11,8 @@ Redirect 301 /features/durablememory.htm
 Redirect 301 memorycentric.html /arch/memorycentric.html
 Redirect 301 /features/persistence.html /arch/persistence.html
 Redirect 301 /features/deploy.html /arch/clustering.html
+Redirect 301 /use-cases/database/key-value-store.html 
/features/key-value-store.html
+Redirect 301 /features/datagrid.html /use-cases/database/datagrid.html
 
 RewriteEngine On 
 

Modified: ignite/site/branches/ignite-7061/arch/clustering.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/arch/clustering.html?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/arch/clustering.html (original)
+++ ignite/site/branches/ignite-7061/arch/clustering.html Fri Feb  9 18:45:46 
2018
@@ -143,6 +143,19 @@ under the License.
 
 
 
+Self-Healing Cluster
+
+
+Ignite cluster can self-heal, where clients 
automatically reconnect in case of failures,
+slow clients are automatically kicked out, and 
data from failed nodes
+is automatically propagated to other nodes in the 
grid:
+
+
+http://apacheignite.readme.io/docs/clients-vs-servers"; target="docs">Docs 
for this Feature 
+
+
+
+
 Cross-platform Support
 
 

Modified: ignite/site/branches/ignite-7061/arch/memorycentric.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/arch/memorycentric.html?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/arch/memorycentric.html (original)
+++ ignite/site/branches/ignite-7061/arch/memorycentric.html Fri Feb  9 
18:45:46 2018
@@ -176,6 +176,20 @@ under the License.
 
 
 
+Partitioning & Replication
+
+
+Depending on the configuration, Ignite can either 
partition or replicate
+data. Unlike REPLICATED mode, where 
data is fully replicated across
+all nodes in the cluster, in 
PARTITIONED mode Ignite will equally split the data
+across multiple cluster no

svn commit: r1823688 [2/2] - in /ignite/site/branches/ignite-7061: ./ arch/ features/ includes/ use-cases/caching/ use-cases/comparison/ use-cases/database/

2018-02-09 Thread dmagda
Modified: ignite/site/branches/ignite-7061/usecases.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/usecases.html?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/usecases.html (original)
+++ ignite/site/branches/ignite-7061/usecases.html Fri Feb  9 18:45:46 2018
@@ -62,7 +62,7 @@ under the License.
 Distributed 
Database
 In-Memory Database
 SQL Database
-Key-Value Store
+Key-Value 
Store
 
 
 

Modified: ignite/site/branches/ignite-7061/whatisignite-bk.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/whatisignite-bk.html?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/whatisignite-bk.html (original)
+++ ignite/site/branches/ignite-7061/whatisignite-bk.html Fri Feb  9 18:45:46 
2018
@@ -72,7 +72,8 @@ under the License.
 
 Ignite's durable memory component treats RAM not just as a 
caching layer but as a complete fully functional storage layer.
 This means that users can turn the persistence on and off 
as needed. If the persistence is off, then Ignite
-can act as a distributed in-memory 
database or in-memory 
data grid,
+can act as a distributed in-memory 
database
+or in-memory data grid,
 depending on whether you prefer to use SQL or key-value 
APIs. If the persistence is turned on, then Ignite becomes a distributed,
 horizontally 
scalable database that guarantees full data consistency and is
 resilient to full cluster failures.
@@ -97,7 +98,7 @@ under the License.
 
 Key-Value
 
-The in-memory data grid component in Ignite is a fully 
transactional distributed 
key-value store that can scale horizontally
+The in-memory data grid component in Ignite is a fully 
transactional distributed key-value 
store that can scale horizontally
 across 100s of servers in the cluster. When persistence is 
enabled, Ignite can also store more data than fits in memory and survive full 
cluster restarts.
 
 

Modified: ignite/site/branches/ignite-7061/whatisignite.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/whatisignite.html?rev=1823688&r1=1823687&r2=1823688&view=diff
==
--- ignite/site/branches/ignite-7061/whatisignite.html (original)
+++ ignite/site/branches/ignite-7061/whatisignite.html Fri Feb  9 18:45:46 2018
@@ -91,7 +91,7 @@ under the License.
 memory-only mode or with Ignite native 
persistence. It can also automatically integrate with any 3rd party databases,
 including any RDBMS or NoSQL stores.
 
-Read more: In-Memory Data Grid
+Read more: In-Memory Data Grid
 
 
 




svn commit: r1823689 - in /ignite/site/branches/ignite-7061: features.html usecases.html

2018-02-09 Thread dmagda
Author: dmagda
Date: Fri Feb  9 18:59:32 2018
New Revision: 1823689

URL: http://svn.apache.org/viewvc?rev=1823689&view=rev
Log:
updated features page

Modified:
ignite/site/branches/ignite-7061/features.html
ignite/site/branches/ignite-7061/usecases.html

Modified: ignite/site/branches/ignite-7061/features.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/features.html?rev=1823689&r1=1823688&r2=1823689&view=diff
==
--- ignite/site/branches/ignite-7061/features.html (original)
+++ ignite/site/branches/ignite-7061/features.html Fri Feb  9 18:59:32 2018
@@ -59,12 +59,12 @@ under the License.
 
 Main Features
 
-Durable 
Memory
-Persistence
 Distributed 
SQL
-Data 
Grid
-Compute 
Grid
-Machine 
Learningβeta
+Distributed Key-Value
+ACID 
Transactions
+Collocated Processing
+Machine 
Learning
+Multi-Language
 
 
 
@@ -79,13 +79,13 @@ under the License.
 
 
 
-Runs Everywhere
+Architecture
 
-Java
-.NET
-C++
-Client 
Protocols
-Deployment 
Options
+Clustering and 
Deployment
+Memory-Centric 
Storage
+Durable 
Memory
+Persistence
+
 
 
 

Modified: ignite/site/branches/ignite-7061/usecases.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/usecases.html?rev=1823689&r1=1823688&r2=1823689&view=diff
==
--- ignite/site/branches/ignite-7061/usecases.html (original)
+++ ignite/site/branches/ignite-7061/usecases.html Fri Feb  9 18:59:32 2018
@@ -62,7 +62,7 @@ under the License.
 Distributed 
Database
 In-Memory Database
 SQL Database
-Key-Value 
Store
+Data 
Grid
 
 
 




svn commit: r1823690 - in /ignite/site/branches/ignite-7061: ./ arch/ community/ features/ use-cases/caching/ use-cases/comparison/ use-cases/database/ use-cases/hadoop/ use-cases/platforms/ use-cases

2018-02-09 Thread dmagda
Author: dmagda
Date: Fri Feb  9 19:03:25 2018
New Revision: 1823690

URL: http://svn.apache.org/viewvc?rev=1823690&view=rev
Log:
updated css

Modified:
ignite/site/branches/ignite-7061/addons.html
ignite/site/branches/ignite-7061/arch/clustering.html
ignite/site/branches/ignite-7061/arch/durablememory.html
ignite/site/branches/ignite-7061/arch/memorycentric.html
ignite/site/branches/ignite-7061/arch/persistence.html
ignite/site/branches/ignite-7061/blogs.html
ignite/site/branches/ignite-7061/community/contribute.html
ignite/site/branches/ignite-7061/community/resources.html
ignite/site/branches/ignite-7061/download.html
ignite/site/branches/ignite-7061/events.html
ignite/site/branches/ignite-7061/features.html
ignite/site/branches/ignite-7061/features/collocatedprocessing.html
ignite/site/branches/ignite-7061/features/computegrid.html
ignite/site/branches/ignite-7061/features/datastructures.html
ignite/site/branches/ignite-7061/features/datavisualization.html
ignite/site/branches/ignite-7061/features/igfs.html
ignite/site/branches/ignite-7061/features/igniterdd.html
ignite/site/branches/ignite-7061/features/key-value-store.html
ignite/site/branches/ignite-7061/features/machinelearning.html
ignite/site/branches/ignite-7061/features/mapreduce.html
ignite/site/branches/ignite-7061/features/messaging.html
ignite/site/branches/ignite-7061/features/rdbmsintegration.html
ignite/site/branches/ignite-7061/features/runseverywhere.html
ignite/site/branches/ignite-7061/features/servicegrid.html
ignite/site/branches/ignite-7061/features/sql.html
ignite/site/branches/ignite-7061/features/streaming.html
ignite/site/branches/ignite-7061/index.html
ignite/site/branches/ignite-7061/provenusecases.html
ignite/site/branches/ignite-7061/screencasts.html
ignite/site/branches/ignite-7061/use-cases/caching/database-caching.html
ignite/site/branches/ignite-7061/use-cases/caching/hibernate-l2-cache.html
ignite/site/branches/ignite-7061/use-cases/caching/jcache-provider.html

ignite/site/branches/ignite-7061/use-cases/caching/web-session-clustering.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-nosql.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-rdbms.html
ignite/site/branches/ignite-7061/use-cases/database/datagrid.html

ignite/site/branches/ignite-7061/use-cases/database/distributed-database.html
ignite/site/branches/ignite-7061/use-cases/database/in-memory-database.html
ignite/site/branches/ignite-7061/use-cases/database/sql-database.html
ignite/site/branches/ignite-7061/use-cases/hadoop/hdfs-cache.html
ignite/site/branches/ignite-7061/use-cases/hadoop/mapreduce.html
ignite/site/branches/ignite-7061/use-cases/platforms/dotnet.html
ignite/site/branches/ignite-7061/use-cases/spark/shared-memory-layer.html
ignite/site/branches/ignite-7061/use-cases/spark/sql-queries.html
ignite/site/branches/ignite-7061/usecases.html
ignite/site/branches/ignite-7061/whatisignite-bk.html
ignite/site/branches/ignite-7061/whatisignite.html

Modified: ignite/site/branches/ignite-7061/addons.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/addons.html?rev=1823690&r1=1823689&r2=1823690&view=diff
==
--- ignite/site/branches/ignite-7061/addons.html (original)
+++ ignite/site/branches/ignite-7061/addons.html Fri Feb  9 19:03:25 2018
@@ -40,7 +40,7 @@ under the License.
 
 
 Addons and Related Solutions - Apache Ignite
-
+
 https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css"; 
rel="stylesheet">
 
 

Modified: ignite/site/branches/ignite-7061/arch/clustering.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/arch/clustering.html?rev=1823690&r1=1823689&r2=1823690&view=diff
==
--- ignite/site/branches/ignite-7061/arch/clustering.html (original)
+++ ignite/site/branches/ignite-7061/arch/clustering.html Fri Feb  9 19:03:25 
2018
@@ -40,7 +40,7 @@ under the License.
 
 
 Clustering and Deployment - Apache Ignite
-
+
 https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css"; 
rel="stylesheet">
 
 

Modified: ignite/site/branches/ignite-7061/arch/durablememory.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/arch/durablememory.html?rev=1823690&r1=1823689&r2=1823690&view=diff
==
--- ignite/site/branches/ignite-7061/arch/durablememory.html (original)
+++ ignite/site/branches/ignite-7061/arch/durablememory.html Fri Feb  9 
19:03:25 2018
@@ -40,7 +40,7 @@ under the License.
 
 
 Durable Memory - Apache Ignite
-
+
 https://netdna.boot

svn commit: r1823698 - in /ignite/site/trunk: events.html index.html

2018-02-09 Thread dmagda
Author: dmagda
Date: Fri Feb  9 20:23:15 2018
New Revision: 1823698

URL: http://svn.apache.org/viewvc?rev=1823698&view=rev
Log:
updated events

Modified:
ignite/site/trunk/events.html
ignite/site/trunk/index.html

Modified: ignite/site/trunk/events.html
URL: 
http://svn.apache.org/viewvc/ignite/site/trunk/events.html?rev=1823698&r1=1823697&r2=1823698&view=diff
==
--- ignite/site/trunk/events.html (original)
+++ ignite/site/trunk/events.html Fri Feb  9 20:23:15 2018
@@ -51,6 +51,106 @@ under the License.
 
 Meetups & Events
 
+
+In-Memory Computing 
Essentials for Data Scientists
+
+
+Symbion IoT Meetup (Copenhagen, 
Denmark), Speaker - Akmal Chaudhri
+March 28, 2018
+
+In this hands on workshop, attendees will be 
introduced to the fundamental capabilities of in-memory computing platforms that
+boost highly-loaded applications, research projects, 
risk analysis and fraud detection tasks by
+storing and processing massive amounts of data in 
memory and on disk across a cluster of machines.
+
+
+
+https://symbion.dk/event/in-memory-computing-essentials-for-data-scientists/";
 target="_blank">Read more
+
+
+
+
+
+https://symbion.dk/event/in-memory-computing-essentials-for-data-scientists/";
+ data-a2a-title="In-Memory Computing Essentials 
for Data Scientists">
+
+
+
+https://www.addtoany.com/share";>
+
+
+
+ 
+
+
+Apache Ignite: the 
in-memory hammer in your data science toolkit
+
+
+Symbion IoT Meetup (Copenhagen, 
Denmark), Speaker - Akmal Chaudhri
+March 27, 2018
+
+In this presentation, Akmal will explain some of the 
main components of Apache Ignite,
+such as the Compute Grid, Data Grid and the Machine 
Learning Grid.
+Through examples, attendees will learn how Apache 
Ignite can be used for data analysis.
+
+
+
+https://symbion.dk/event/apache-ignite-the-in-memory-hammer-in-your-data-science-toolkit/";
 target="_blank">Read more
+
+
+
+
+
+https://symbion.dk/event/apache-ignite-the-in-memory-hammer-in-your-data-science-toolkit/";
+ data-a2a-title="Apache Ignite: the in-memory 
hammer in your data science toolkit">
+
+
+
+https://www.addtoany.com/share";>
+
+
+
+ 
+
+
+Basics of In-Memory 
Computing for architects and developers: Part 1
+
+
+Webinar, Denis 
Magda
+Febuary 28, 2018
+
+Denis Magda will talk about the main features and 
components of In-Memory Computing solutions using the example of Apache Ignite.
+The webinar combines theory and practice, after which 
participants will be able to design and write code for similar systems.
+On specific examples of the code you will learn about:
+
+Configuration and launch of clusters
+Data processing using key-value API
+Optimal data processing with distributed 
SQL
+
+
+This webinar is in Russian.
+
+
+
+https://www.gridgain.com/resources/webinars/essentials-in-russian-part1"; 
target="_blank">Read more
+
+
+
+
+
+https://www.gridgain.com/resources/webinars/essentials-in-russian-part1";
+ data-a2a-title="Basics of In-Memory Computing

svn commit: r1823717 - in /ignite/site/branches/ignite-7061: ./ arch/ features/ includes/ use-cases/caching/ use-cases/comparison/ use-cases/database/

2018-02-09 Thread dmagda
Author: dmagda
Date: Sat Feb 10 00:07:12 2018
New Revision: 1823717

URL: http://svn.apache.org/viewvc?rev=1823717&view=rev
Log:
reworked key-value apis

Added:
ignite/site/branches/ignite-7061/features/datagrid.html
  - copied, changed from r1823716, 
ignite/site/branches/ignite-7061/use-cases/database/datagrid.html
ignite/site/branches/ignite-7061/use-cases/database/key-value-store.html
  - copied, changed from r1823716, 
ignite/site/branches/ignite-7061/features/key-value-store.html
Removed:
ignite/site/branches/ignite-7061/features/key-value-store.html
ignite/site/branches/ignite-7061/use-cases/database/datagrid.html
Modified:
ignite/site/branches/ignite-7061/.htaccess
ignite/site/branches/ignite-7061/arch/memorycentric.html
ignite/site/branches/ignite-7061/download.html
ignite/site/branches/ignite-7061/features.html
ignite/site/branches/ignite-7061/features/datastructures.html
ignite/site/branches/ignite-7061/features/sql.html
ignite/site/branches/ignite-7061/includes/header.html
ignite/site/branches/ignite-7061/index.html
ignite/site/branches/ignite-7061/sitemap.xml
ignite/site/branches/ignite-7061/use-cases/caching/database-caching.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-nosql.html
ignite/site/branches/ignite-7061/use-cases/comparison/ignite-for-rdbms.html

ignite/site/branches/ignite-7061/use-cases/database/distributed-database.html
ignite/site/branches/ignite-7061/use-cases/database/in-memory-database.html
ignite/site/branches/ignite-7061/usecases.html
ignite/site/branches/ignite-7061/whatisignite-bk.html
ignite/site/branches/ignite-7061/whatisignite.html

Modified: ignite/site/branches/ignite-7061/.htaccess
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/.htaccess?rev=1823717&r1=1823716&r2=1823717&view=diff
==
--- ignite/site/branches/ignite-7061/.htaccess (original)
+++ ignite/site/branches/ignite-7061/.htaccess Sat Feb 10 00:07:12 2018
@@ -11,8 +11,6 @@ Redirect 301 /features/durablememory.htm
 Redirect 301 memorycentric.html /arch/memorycentric.html
 Redirect 301 /features/persistence.html /arch/persistence.html
 Redirect 301 /features/deploy.html /arch/clustering.html
-Redirect 301 /use-cases/database/key-value-store.html 
/features/key-value-store.html
-Redirect 301 /features/datagrid.html /use-cases/database/datagrid.html
 
 RewriteEngine On 
 

Modified: ignite/site/branches/ignite-7061/arch/memorycentric.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/arch/memorycentric.html?rev=1823717&r1=1823716&r2=1823717&view=diff
==
--- ignite/site/branches/ignite-7061/arch/memorycentric.html (original)
+++ ignite/site/branches/ignite-7061/arch/memorycentric.html Sat Feb 10 
00:07:12 2018
@@ -221,7 +221,7 @@ under the License.
 and therefore is able to store more data than can 
fit in physical memory:
 
 
-Docs 
for this Feature 
+Docs for this 
Feature 
 
 
 

Modified: ignite/site/branches/ignite-7061/download.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/download.html?rev=1823717&r1=1823716&r2=1823717&view=diff
==
--- ignite/site/branches/ignite-7061/download.html (original)
+++ ignite/site/branches/ignite-7061/download.html Sat Feb 10 00:07:12 2018
@@ -131,7 +131,7 @@ under the License.
 Durable Memory
 Native Persistence
 SQL Database
-Data Grid
+Data Grid
 Compute Grid
 Streaming
 Machine 
Learningβeta
@@ -165,7 +165,7 @@ under the License.
 Durable Memory
 Native Persistence
 SQL 
Database
-Data Grid
+Data Grid
 Compute Grid
 Streaming
 Machine 
Learningβeta
@@ -198,7 +198,7 @@ under the License.
 Distributed 
Database
 In-Memory Database
 
-Key-Value Store
+ 

svn commit: r1823719 - /ignite/site/branches/ignite-7061/download.html

2018-02-09 Thread dmagda
Author: dmagda
Date: Sat Feb 10 00:14:15 2018
New Revision: 1823719

URL: http://svn.apache.org/viewvc?rev=1823719&view=rev
Log:
reworked key-value apis

Modified:
ignite/site/branches/ignite-7061/download.html

Modified: ignite/site/branches/ignite-7061/download.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/download.html?rev=1823719&r1=1823718&r2=1823719&view=diff
==
--- ignite/site/branches/ignite-7061/download.html (original)
+++ ignite/site/branches/ignite-7061/download.html Sat Feb 10 00:14:15 2018
@@ -106,6 +106,7 @@ under the License.
 
 
 
+
 
 
 
@@ -121,84 +122,64 @@ under the License.
 
 
 Features
-
-
-Overview
-What is Ignite™?
-What is Memory-Centric?
-What is Collocated 
Processing?
-Main Features
-Durable Memory
-Native Persistence
-SQL Database
-Data Grid
-Compute Grid
-Streaming
-Machine 
Learningβeta
-More Features
-Tooling
-Ignite Web 
Console
-More Tooling
-
-
-Runs Everywhere
-Java
-.NET
-C++
-Client Protocols
-Deployment Options
-Hadoop & Spark
-Spark Shared RDDs
-In-Memory File System
-In-Memory MapReduce
-Add-Ons
-GA Gridβeta
-More 
Add-ons
-
-
-
+
 Overview
 What 
is Ignite™?
-What is Memory-Centric?
-What is Collocated 
Processing?
-Main Features
-Durable Memory
-Native Persistence
-SQL 
Database
-Data Grid
-Compute Grid
-Streaming
-Machine 
Learningβeta
+
+
+Features
+Distributed SQL
+Distributed Key-Value
+ACID Transactions
+Collocated Processing
+Machine Learning
+Multi-Language
 More 
Features
+
+
+
+Architecture
+Clustering and Deployment
+Memory-Centric Storage
+Durable Memory
+Persistence
+
+
+
 Tooling
 Ignite Web 
Console
-More Tooling
-Runs Everywhere
-Java
-.NET
-C++
-   

svn commit: r1823720 - in /ignite/site/branches/ignite-7061: ./ events.html index.html

2018-02-09 Thread dmagda
Author: dmagda
Date: Sat Feb 10 00:20:32 2018
New Revision: 1823720

URL: http://svn.apache.org/viewvc?rev=1823720&view=rev
Log:
updated from trunk

Modified:
ignite/site/branches/ignite-7061/   (props changed)
ignite/site/branches/ignite-7061/events.html
ignite/site/branches/ignite-7061/index.html

Propchange: ignite/site/branches/ignite-7061/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 10 00:20:32 2018
@@ -1,3 +1,3 @@
 /ignite/site/ignite-6036:1805444-1805983
-/ignite/site/trunk:1805945-1805982,1816578-1823600
+/ignite/site/trunk:1805945-1805982,1816578-1823719
 /incubator/ignite/site/branches/sidenav:1646576-1658604

Modified: ignite/site/branches/ignite-7061/events.html
URL: 
http://svn.apache.org/viewvc/ignite/site/branches/ignite-7061/events.html?rev=1823720&r1=1823719&r2=1823720&view=diff
==
--- ignite/site/branches/ignite-7061/events.html (original)
+++ ignite/site/branches/ignite-7061/events.html Sat Feb 10 00:20:32 2018
@@ -51,6 +51,106 @@ under the License.
 
 Meetups & Events
 
+
+In-Memory Computing 
Essentials for Data Scientists
+
+
+Symbion IoT Meetup (Copenhagen, 
Denmark), Speaker - Akmal Chaudhri
+March 28, 2018
+
+In this hands on workshop, attendees will be 
introduced to the fundamental capabilities of in-memory computing platforms that
+boost highly-loaded applications, research projects, 
risk analysis and fraud detection tasks by
+storing and processing massive amounts of data in 
memory and on disk across a cluster of machines.
+
+
+
+https://symbion.dk/event/in-memory-computing-essentials-for-data-scientists/";
 target="_blank">Read more
+
+
+
+
+
+https://symbion.dk/event/in-memory-computing-essentials-for-data-scientists/";
+ data-a2a-title="In-Memory Computing Essentials 
for Data Scientists">
+
+
+
+https://www.addtoany.com/share";>
+
+
+
+ 
+
+
+Apache Ignite: the 
in-memory hammer in your data science toolkit
+
+
+Symbion IoT Meetup (Copenhagen, 
Denmark), Speaker - Akmal Chaudhri
+March 27, 2018
+
+In this presentation, Akmal will explain some of the 
main components of Apache Ignite,
+such as the Compute Grid, Data Grid and the Machine 
Learning Grid.
+Through examples, attendees will learn how Apache 
Ignite can be used for data analysis.
+
+
+
+https://symbion.dk/event/apache-ignite-the-in-memory-hammer-in-your-data-science-toolkit/";
 target="_blank">Read more
+
+
+
+
+
+https://symbion.dk/event/apache-ignite-the-in-memory-hammer-in-your-data-science-toolkit/";
+ data-a2a-title="Apache Ignite: the in-memory 
hammer in your data science toolkit">
+
+
+
+https://www.addtoany.com/share";>
+
+
+
+ 
+
+
+Basics of In-Memory 
Computing for architects and developers: Part 1
+
+
+Webinar, Denis 
Magda
+Febuary 28, 2018
+
+Denis Magda will talk about the main features and 
components of In-Memory Computing solutions using the example of Apache Ignite.
+The webinar combines theory and practice, after which 
participants will be able to design and write code for similar systems.
+On specific examples of the code you will learn about:
+
+Configuration and launch of clusters
+Data processing using key-value API
+Optimal data processing with distributed 
SQL
+