You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2018/01/17 10:47:22 UTC
[05/32] ignite git commit: IGNITE-7203 Java 8 by default
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/examples/src/test/ml/org/apache/ignite/ml/testsuites/IgniteExamplesMLTestSuite.java
----------------------------------------------------------------------
diff --git a/examples/src/test/ml/org/apache/ignite/ml/testsuites/IgniteExamplesMLTestSuite.java b/examples/src/test/ml/org/apache/ignite/ml/testsuites/IgniteExamplesMLTestSuite.java
deleted file mode 100644
index bc917b9..0000000
--- a/examples/src/test/ml/org/apache/ignite/ml/testsuites/IgniteExamplesMLTestSuite.java
+++ /dev/null
@@ -1,140 +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.ml.testsuites;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import javassist.CannotCompileException;
-import javassist.ClassClassPath;
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.CtNewMethod;
-import javassist.NotFoundException;
-import junit.framework.TestSuite;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridAbstractExamplesTest;
-
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP;
-
-/**
- * Examples test suite.
- * <p>
- * Contains only Spring ignite examples tests.
- */
-public class IgniteExamplesMLTestSuite extends TestSuite {
- /**
- * @return Suite.
- * @throws Exception If failed.
- */
- public static TestSuite suite() throws Exception {
- System.setProperty(IGNITE_OVERRIDE_MCAST_GRP,
- GridTestUtils.getNextMulticastGroup(IgniteExamplesMLTestSuite.class));
-
- TestSuite suite = new TestSuite("Ignite ML Examples Test Suite");
-
- for (Class clazz : getClasses("org.apache.ignite.examples.ml", ".*Example$"))
- suite.addTest(new TestSuite(makeTestClass(clazz, "org.apache.ignite.ml.examples")));
-
- return suite;
- }
-
- /**
- * Creates test class for given example.
- *
- * @param exampleCls Class of the example to be tested
- * @param basePkgForTests Base package to create test classes in
- * @return Test class
- * @throws NotFoundException if class not found
- * @throws CannotCompileException if test class cannot be compiled
- */
- private static Class makeTestClass(Class<?> exampleCls, String basePkgForTests)
- throws NotFoundException, CannotCompileException {
- ClassPool cp = ClassPool.getDefault();
- cp.insertClassPath(new ClassClassPath(IgniteExamplesMLTestSuite.class));
-
- CtClass cl = cp.makeClass(basePkgForTests + "." + exampleCls.getSimpleName() + "SelfName");
-
- cl.setSuperclass(cp.get(GridAbstractExamplesTest.class.getName()));
-
- cl.addMethod(CtNewMethod.make("public void testExample() { "
- + exampleCls.getCanonicalName()
- + ".main("
- + GridAbstractExamplesTest.class.getName()
- + ".EMPTY_ARGS); }", cl));
-
- return cl.toClass();
- }
-
- /**
- * Scans all classes accessible from the context class loader which belong to the given package and subpackages.
- *
- * @param pkgName The base package
- * @return The classes
- * @throws ClassNotFoundException if some classes not found
- * @throws IOException if some resources unavailable
- */
- private static List<Class> getClasses(String pkgName, String clsNamePtrn) throws ClassNotFoundException, IOException {
- String path = pkgName.replace('.', '/');
-
- Enumeration<URL> resources = Thread.currentThread()
- .getContextClassLoader()
- .getResources(path);
-
- List<File> dirs = new ArrayList<>();
- while (resources.hasMoreElements())
- dirs.add(new File(resources.nextElement().getFile()));
-
- List<Class> classes = new ArrayList<>();
- for (File directory : dirs)
- classes.addAll(findClasses(directory, pkgName, clsNamePtrn));
-
- return classes;
- }
-
- /**
- * Recursive method used to find all classes in a given directory and subdirs.
- *
- * @param dir The base directory
- * @param pkgName The package name for classes found inside the base directory
- * @return The classes
- * @throws ClassNotFoundException if class not found
- */
- private static List<Class> findClasses(File dir, String pkgName, String clsNamePtrn) throws ClassNotFoundException {
- List<Class> classes = new ArrayList<>();
- if (!dir.exists())
- return classes;
-
- File[] files = dir.listFiles();
- if (files != null)
- for (File file : files) {
- if (file.isDirectory())
- classes.addAll(findClasses(file, pkgName + "." + file.getName(), clsNamePtrn));
- else if (file.getName().endsWith(".class")) {
- String clsName = pkgName + '.' + file.getName().substring(0, file.getName().length() - 6);
- if (clsName.matches(clsNamePtrn))
- classes.add(Class.forName(clsName));
- }
- }
-
- return classes;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/aop/pom.xml
----------------------------------------------------------------------
diff --git a/modules/aop/pom.xml b/modules/aop/pom.xml
index 12fe5e0..3e20931 100644
--- a/modules/aop/pom.xml
+++ b/modules/aop/pom.xml
@@ -114,6 +114,17 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ <argLine>-javaagent:${basedir}/target/libs/aspectjweaver-${aspectj.version}.jar</argLine>
+ <workingDirectory>${basedir}/target</workingDirectory>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
</project>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java b/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java
index 28b7320..54ac74f 100644
--- a/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java
+++ b/modules/aop/src/test/java/org/apache/ignite/gridify/BasicAopSelfTest.java
@@ -17,18 +17,16 @@
package org.apache.ignite.gridify;
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.Callable;
-import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.gridify.Gridify;
import org.apache.ignite.compute.gridify.GridifyArgument;
import org.apache.ignite.compute.gridify.GridifyTaskSplitAdapter;
-import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import java.util.Collection;
+import java.util.List;
+
/**
* Tries to execute dummy gridified task. It should fail because grid is not started.
* <p>
@@ -40,18 +38,14 @@ public class BasicAopSelfTest extends GridCommonAbstractTest {
* @throws Exception If failed.
*/
public void testAop() throws Exception {
- GridTestUtils.assertThrows(
- log,
- new Callable<Object>() {
- @Override public Object call() throws Exception {
- gridify();
+ try {
+ gridify();
- return null;
- }
- },
- IgniteCheckedException.class,
- "Grid is not locally started: null"
- );
+ fail();
+ }
+ catch (Exception e) {
+ // No-op.
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java
index 7c2d3ea..b2dcea2 100644
--- a/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java
+++ b/modules/aop/src/test/java/org/apache/ignite/testsuites/IgniteAopSelfTestSuite.java
@@ -40,13 +40,13 @@ public class IgniteAopSelfTestSuite extends TestSuite {
TestSuite suite = new TestSuite("Ignite AOP Test Suite");
// Test configuration.
- suite.addTest(new TestSuite(BasicAopSelfTest.class));
+ suite.addTestSuite(BasicAopSelfTest.class);
- suite.addTest(new TestSuite(SpringAopSelfTest.class));
- suite.addTest(new TestSuite(NonSpringAopSelfTest.class));
- suite.addTest(new TestSuite(GridifySetToXXXSpringAopSelfTest.class));
- suite.addTest(new TestSuite(GridifySetToXXXNonSpringAopSelfTest.class));
- suite.addTest(new TestSuite(ExternalNonSpringAopSelfTest.class));
+ suite.addTestSuite(SpringAopSelfTest.class);
+ suite.addTestSuite(NonSpringAopSelfTest.class);
+ suite.addTestSuite(GridifySetToXXXSpringAopSelfTest.class);
+ suite.addTestSuite(GridifySetToXXXNonSpringAopSelfTest.class);
+ suite.addTestSuite(ExternalNonSpringAopSelfTest.class);
// Examples
System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteAopSelfTestSuite.class));
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/benchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/modules/benchmarks/pom.xml b/modules/benchmarks/pom.xml
index a2b4ac8..1c71b48 100644
--- a/modules/benchmarks/pom.xml
+++ b/modules/benchmarks/pom.xml
@@ -35,9 +35,6 @@
<url>http://ignite.apache.org</url>
<properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <jmh.version>1.13</jmh.version>
- <javac.target>1.7</javac.target>
<uberjar.name>benchmarks</uberjar.name>
</properties>
@@ -71,16 +68,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <compilerVersion>${javac.target}</compilerVersion>
- <source>${javac.target}</source>
- <target>${javac.target}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/cassandra/serializers/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/serializers/pom.xml b/modules/cassandra/serializers/pom.xml
index 07bb1a9..6d040e3 100644
--- a/modules/cassandra/serializers/pom.xml
+++ b/modules/cassandra/serializers/pom.xml
@@ -87,9 +87,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
- <compilerVersion>1.7</compilerVersion>
<encoding>UTF-8</encoding>
<fork>true</fork>
<debug>false</debug>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/cassandra/store/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/store/pom.xml b/modules/cassandra/store/pom.xml
index 848c858..0729e08 100644
--- a/modules/cassandra/store/pom.xml
+++ b/modules/cassandra/store/pom.xml
@@ -149,9 +149,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
- <compilerVersion>1.7</compilerVersion>
<encoding>UTF-8</encoding>
<fork>true</fork>
<debug>false</debug>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/codegen/pom.xml
----------------------------------------------------------------------
diff --git a/modules/codegen/pom.xml b/modules/codegen/pom.xml
index bce03eb..bf20d06 100644
--- a/modules/codegen/pom.xml
+++ b/modules/codegen/pom.xml
@@ -20,7 +20,8 @@
<!--
POM file.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -34,12 +35,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.7</maven.compiler.source>
- <maven.compiler.target>1.7</maven.compiler.target>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 5ddc8ce..e946789 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -399,8 +399,6 @@
<properties>
<domain-lib-dir>${project.build.directory}/domainlib</domain-lib-dir>
<domain-jar>domain.jar</domain-jar>
-
- <javax.cache.tck.version>1.0.1</javax.cache.tck.version>
</properties>
<dependencies>
@@ -421,7 +419,7 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
- <version>1.2</version>
+ <version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/indexing/pom.xml
----------------------------------------------------------------------
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index fc965c5..f2e1797 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -34,10 +34,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <java8.test.folder>${project.build.testSourceDirectory}</java8.test.folder>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
@@ -125,53 +121,9 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>java8</id>
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
- <properties>
- <javadoc.opts>-Xdoclint:none</javadoc.opts>
- <java8.test.folder>${project.build.testSourceDirectory}/../java8</java8.test.folder>
- </properties>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<build>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.9.1</version>
- <executions>
- <execution>
- <id>add-tests</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java8.test.folder}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/mesos/pom.xml
----------------------------------------------------------------------
diff --git a/modules/mesos/pom.xml b/modules/mesos/pom.xml
index 19f24f1..792191b 100644
--- a/modules/mesos/pom.xml
+++ b/modules/mesos/pom.xml
@@ -63,17 +63,6 @@
<build>
<plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/ml/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ml/pom.xml b/modules/ml/pom.xml
index 4ee4ecf..a20a596 100644
--- a/modules/ml/pom.xml
+++ b/modules/ml/pom.xml
@@ -33,11 +33,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <netlibjava.version>1.1.2</netlibjava.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
@@ -108,7 +103,6 @@
<profiles>
<profile>
<id>lgpl</id>
-
<dependencies>
<dependency>
<groupId>com.github.fommil.netlib</groupId>
@@ -119,16 +113,4 @@
</dependencies>
</profile>
</profiles>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs
index 9ccef2b..51f2865 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageConfigurationParityTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageMetricsParityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageMetricsParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageMetricsParityTest.cs
index a182587..2206891 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageMetricsParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataStorageMetricsParityTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/QueryEntityConfigurationParityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/QueryEntityConfigurationParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/QueryEntityConfigurationParityTest.cs
index 0b481ed..a9830d8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/QueryEntityConfigurationParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/QueryEntityConfigurationParityTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index fbd8775..6834d5d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistenceTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistenceTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistenceTest.cs
index c1be392..4a60f7b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistenceTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistenceTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
index 6b59377..e0e393f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/PersistentStoreTestObsolete.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
index 7ee6695..5c48284 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheDmlQueriesTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/ClientCacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/ClientCacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/ClientCacheConfigurationTest.cs
index 903b038..04ad7dc 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/ClientCacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/ClientCacheConfigurationTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
index 047fc2b..51f54ab 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/Cache/CreateCacheTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientConnectionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientConnectionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientConnectionTest.cs
index 417e60a..999fdf8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientConnectionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientConnectionTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientTestBase.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientTestBase.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientTestBase.cs
index 9fea52c..71e4a6f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientTestBase.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientTestBase.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test
index 2bda365..c6aaa52 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test
@@ -32,9 +32,9 @@
<add key="Ignite.Assembly.2" value="test-2.dll" />
<add key="Ignite.JvmOption.1" value="-DOPT1" />
<add key="Ignite.JvmOption.2" value="-DOPT2" />
- <add key="Ignite.JvmOption.3" value="-Xms601m" />
+ <add key="Ignite.JvmOption.3" value="-Xms602m" />
<add key="Ignite.JvmOption.4" value="-Xmx702m" />
- <add key="Ignite.JvmInitialMemoryMB" value="601" />
+ <add key="Ignite.JvmInitialMemoryMB" value="602" />
<add key="Ignite.JvmMaxMemoryMB" value="702" />
</appSettings>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test2
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test2 b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test2
index f40f220..566b57b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test2
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Apache.Ignite.exe.config.test2
@@ -51,7 +51,7 @@
<add key="Ignite.Assembly.2" value="test-2.dll" />
<add key="Ignite.JvmOption.1" value="-DOPT1" />
<add key="Ignite.JvmOption.2" value="-DOPT2" />
- <add key="Ignite.JvmOption.3" value="-Xms601m" />
+ <add key="Ignite.JvmOption.3" value="-Xms602m" />
<add key="Ignite.ConfigSectionName" value="igniteConfiguration" />
</appSettings>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
index 29aa704..e1ca13a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/full-config.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
index 0ba0de6..eb1e68e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
@@ -111,7 +111,7 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(SpringCfgPath, cfg.SpringConfigUrl);
Assert.IsTrue(cfg.JvmOptions.Contains("-DOPT1") && cfg.JvmOptions.Contains("-DOPT2"));
Assert.IsTrue(cfg.Assemblies.Contains("test-1.dll") && cfg.Assemblies.Contains("test-2.dll"));
- Assert.AreEqual(601, cfg.JvmInitialMemoryMb);
+ Assert.AreEqual(602, cfg.JvmInitialMemoryMb);
Assert.AreEqual(702, cfg.JvmMaxMemoryMb);
}
@@ -192,18 +192,18 @@ namespace Apache.Ignite.Core.Tests
var proc = new IgniteProcess(
"-jvmClasspath=" + TestUtils.CreateTestClasspath(),
"-springConfigUrl=" + SpringCfgPath,
- "-JvmInitialMemoryMB=615",
- "-JvmMaxMemoryMB=863"
+ "-JvmInitialMemoryMB=616",
+ "-JvmMaxMemoryMB=866"
);
Assert.IsTrue(proc.Alive);
Assert.IsTrue(_grid.WaitTopology(2));
var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
- Assert.AreEqual((long) 615*1024*1024, minMem);
+ Assert.AreEqual((long) 616*1024*1024, minMem);
var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
- AssertJvmMaxMemory((long) 863*1024*1024, maxMem);
+ AssertJvmMaxMemory((long) 866*1024*1024, maxMem);
}
/// <summary>
@@ -224,7 +224,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2));
var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
- Assert.AreEqual((long) 601*1024*1024, minMem);
+ Assert.AreEqual((long) 602*1024*1024, minMem);
var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 702*1024*1024, maxMem);
@@ -236,13 +236,13 @@ namespace Apache.Ignite.Core.Tests
// Command line options overwrite config file options
// ReSharper disable once RedundantAssignment
proc = new IgniteProcess("-jvmClasspath=" + TestUtils.CreateTestClasspath(),
- "-J-Xms605m", "-J-Xmx706m");
+ "-J-Xms606m", "-J-Xmx706m");
Assert.IsTrue(proc.Alive);
Assert.IsTrue(_grid.WaitTopology(2));
minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
- Assert.AreEqual((long) 605*1024*1024, minMem);
+ Assert.AreEqual((long) 606*1024*1024, minMem);
maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 706*1024*1024, maxMem);
@@ -257,7 +257,7 @@ namespace Apache.Ignite.Core.Tests
var proc = new IgniteProcess(
"-jvmClasspath=" + TestUtils.CreateTestClasspath(),
"-springConfigUrl=" + SpringCfgPath,
- "-J-Xms555m",
+ "-J-Xms556m",
"-J-Xmx666m",
"-JvmInitialMemoryMB=128",
"-JvmMaxMemoryMB=256"
@@ -268,7 +268,7 @@ namespace Apache.Ignite.Core.Tests
// Raw JVM options (Xms/Xmx) should override custom options
var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
- Assert.AreEqual((long) 555*1024*1024, minMem);
+ Assert.AreEqual((long) 556*1024*1024, minMem);
var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 666*1024*1024, maxMem);
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 1260aa5..543bb6d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index 0b1b499..0bc4e0f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/WindowsServiceTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/WindowsServiceTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/WindowsServiceTest.cs
index 08d365a..ee909f3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/WindowsServiceTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/WindowsServiceTest.cs
@@ -18,10 +18,13 @@
namespace Apache.Ignite.Core.Tests
{
using System;
+ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.ServiceProcess;
using Apache.Ignite.Core.Cluster;
+ using Apache.Ignite.Core.Impl.Unmanaged.Jni;
+ using Apache.Ignite.Core.Log;
using Apache.Ignite.Core.Tests.Process;
using NUnit.Framework;
@@ -56,23 +59,29 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestStopFromJava()
{
+ var startTime = DateTime.Now.AddSeconds(-1);
+
var exePath = typeof(IgniteRunner).Assembly.Location;
var springPath = Path.GetFullPath(@"config\compute\compute-grid1.xml");
+ JvmDll.Load(null, new NoopLogger());
+ var jvmDll = System.Diagnostics.Process.GetCurrentProcess().Modules
+ .OfType<ProcessModule>()
+ .Single(x => JvmDll.FileJvmDll.Equals(x.ModuleName, StringComparison.OrdinalIgnoreCase));
+
IgniteProcess.Start(exePath, string.Empty, args: new[]
{
"/install",
"ForceTestClasspath=true",
"-springConfigUrl=" + springPath,
- "-J-Xms513m",
- "-J-Xmx555m"
+ "-jvmDll=" + jvmDll.FileName
}).WaitForExit();
var service = GetIgniteService();
Assert.IsNotNull(service);
service.Start(); // see IGNITE_HOME\work\log for service instance logs
- service.WaitForStatus(ServiceControllerStatus.Running, TimeSpan.FromSeconds(30));
+ WaitForStatus(service, startTime, ServiceControllerStatus.Running);
using (var ignite = Ignition.Start(new IgniteConfiguration(TestUtils.GetTestConfiguration())
{
@@ -89,8 +98,33 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(ignite.WaitTopology(1), "Failed to stop remote node");
- // Check that service has stopped
- service.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(30));
+ // Check that service has stopped.
+ WaitForStatus(service, startTime, ServiceControllerStatus.Stopped);
+ }
+ }
+
+ /// <summary>
+ /// Waits for service status.
+ /// </summary>
+ private static void WaitForStatus(ServiceController service, DateTime startTime,
+ ServiceControllerStatus status)
+ {
+ try
+ {
+ service.WaitForStatus(status, TimeSpan.FromSeconds(30));
+ }
+ catch (Exception ex)
+ {
+ // Check Windows log for more details.
+ var log = EventLog.GetEventLogs().Single(x => x.Log == "Application");
+ var entries = log.Entries;
+ var recentEntries = Enumerable.Range(0, entries.Count)
+ .Select(x => entries[x])
+ .Where(x => x.TimeGenerated >= startTime)
+ .Select(x => x.Message);
+ var msg = string.Join("\n===\n", recentEntries);
+
+ throw new Exception("Failed to start service. Event entries:\n" + msg, ex);
}
}
@@ -120,5 +154,19 @@ namespace Apache.Ignite.Core.Tests
{
return ServiceController.GetServices().FirstOrDefault(x => x.ServiceName.StartsWith("Apache Ignite.NET"));
}
+
+ private class NoopLogger : ILogger
+ {
+ public void Log(LogLevel level, string message, object[] args, IFormatProvider formatProvider, string category,
+ string nativeErrorInfo, Exception ex)
+ {
+ // No-op.
+ }
+
+ public bool IsEnabled(LogLevel level)
+ {
+ return false;
+ }
+ }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryEntity.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryEntity.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryEntity.cs
index a1fb4e0..8855535 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryEntity.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryEntity.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryField.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryField.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryField.cs
index 38aeed3..a96f1bf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryField.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QueryField.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QuerySqlFieldAttribute.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QuerySqlFieldAttribute.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QuerySqlFieldAttribute.cs
index 96912dd..dd131f9 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QuerySqlFieldAttribute.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/QuerySqlFieldAttribute.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Client/Cache/CacheClientConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Client/Cache/CacheClientConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Client/Cache/CacheClientConfiguration.cs
index 1c1874f..fad6b58 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Client/Cache/CacheClientConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Client/Cache/CacheClientConfiguration.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ClientConnectorConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ClientConnectorConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ClientConnectorConfiguration.cs
index aff2716..e51a08c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ClientConnectorConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ClientConnectorConfiguration.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 84afdc4..7deebc5 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/Cache/ClientCacheConfigurationSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/Cache/ClientCacheConfigurationSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/Cache/ClientCacheConfigurationSerializer.cs
index b11b175..552c778 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/Cache/ClientCacheConfigurationSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Client/Cache/ClientCacheConfigurationSerializer.cs
@@ -1,4 +1,4 @@
-/*
+/*
* 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.
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Env.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Env.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Env.cs
index 93b5e69..f3632ce 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Env.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/Jni/Env.cs
@@ -19,9 +19,11 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
{
using System;
using System.Diagnostics;
+ using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
using Apache.Ignite.Core.Common;
+ using Apache.Ignite.Core.Impl.Common;
/// <summary>
/// JNIEnv.
@@ -236,8 +238,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged.Jni
if (res == IntPtr.Zero)
{
- throw new IgniteException("Java class is not found (did you set IGNITE_HOME environment " +
- "variable?): " + name);
+ var msg = "Java class is not found (did you set IGNITE_HOME environment variable?): " + name;
+
+ throw new IgniteException(msg);
}
return NewGlobalRef(res);
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite/IgniteRunner.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/IgniteRunner.cs b/modules/platforms/dotnet/Apache.Ignite/IgniteRunner.cs
index c6660c3..8924591 100644
--- a/modules/platforms/dotnet/Apache.Ignite/IgniteRunner.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/IgniteRunner.cs
@@ -137,7 +137,7 @@ namespace Apache.Ignite
Console.WriteLine("\t-ConfigSectionName name of the IgniteConfigurationSection in app.config to use.");
Console.WriteLine("\t-ConfigFileName path to the app.config file (if not provided Apache.Ignite.exe.config is used).");
Console.WriteLine("\t-springConfigUrl path to Spring configuration file.");
- Console.WriteLine("\t-jvmDllPath path to JVM library jvm.dll (if not provided JAVA_HOME environment variable is used).");
+ Console.WriteLine("\t-jvmDll path to JVM library jvm.dll (if not provided JAVA_HOME environment variable is used).");
Console.WriteLine("\t-jvmClasspath classpath passed to JVM (enlist additional jar files here).");
Console.WriteLine("\t-suppressWarnings whether to print warnings.");
Console.WriteLine("\t-J<javaOption> JVM options passed to created JVM.");
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/platforms/dotnet/Apache.Ignite/Service/IgniteService.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Service/IgniteService.cs b/modules/platforms/dotnet/Apache.Ignite/Service/IgniteService.cs
index 839727e..b34ad71 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Service/IgniteService.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Service/IgniteService.cs
@@ -42,7 +42,7 @@ namespace Apache.Ignite.Service
Assembly.GetExecutingAssembly().GetName().Version.ToString(4);
/** Service description. */
- public const string SvcDesc = "Apache Ignite.NET Service.";
+ public const string SvcDesc = "Apache Ignite.NET Service";
/** Current executable name. */
private static readonly string ExeName =
@@ -152,7 +152,16 @@ namespace Apache.Ignite.Service
var argString = new StringBuilder(IgniteRunner.Svc);
foreach (var arg in args)
- argString.Append(" ").AppendFormat("-{0}={1}", arg.Item1, arg.Item2);
+ {
+ var val = arg.Item2;
+
+ if (val.Contains(' '))
+ {
+ val = '"' + val + '"';
+ }
+
+ argString.Append(" ").AppendFormat("-{0}={1}", arg.Item1, val);
+ }
IgniteServiceInstaller.Args = argString.ToString();
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/sqlline/pom.xml
----------------------------------------------------------------------
diff --git a/modules/sqlline/pom.xml b/modules/sqlline/pom.xml
index ac80948..30a72db 100644
--- a/modules/sqlline/pom.xml
+++ b/modules/sqlline/pom.xml
@@ -35,10 +35,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
<dependencies>
<dependency>
<groupId>sqlline</groupId>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/tools/pom.xml
----------------------------------------------------------------------
diff --git a/modules/tools/pom.xml b/modules/tools/pom.xml
index b71c421..653d470 100644
--- a/modules/tools/pom.xml
+++ b/modules/tools/pom.xml
@@ -34,12 +34,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.7</maven.compiler.source>
- <maven.compiler.target>1.7</maven.compiler.target>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.jodd</groupId>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/pom-standalone.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom-standalone.xml b/modules/yardstick/pom-standalone.xml
index 58920b9..577a95e 100644
--- a/modules/yardstick/pom-standalone.xml
+++ b/modules/yardstick/pom-standalone.xml
@@ -31,8 +31,6 @@
<properties>
<yardstick.version>0.8.3</yardstick.version>
<spring.version>4.1.0.RELEASE</spring.version>
- <!-- Will be changed by profile activation. Allows to combine profiles. -->
- <ml.folder>src/main/java</ml.folder>
</properties>
<dependencies>
@@ -103,63 +101,9 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>ml</id>
-
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
-
- <properties>
- <ml.folder>src/main/ml</ml.folder>
- <java.ver>1.8</java.ver>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.ignite</groupId>
- <artifactId>ignite-ml</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<build>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-sources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${ml.folder}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.8</version>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/pom.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index 8dda6a7..6327288 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -34,15 +34,6 @@
<version>2.4.0-SNAPSHOT</version>
<url>http://ignite.apache.org</url>
- <properties>
- <yardstick.version>0.8.3</yardstick.version>
- <mysql.connector.version>5.1.39</mysql.connector.version>
- <postgres.connector.version>9.4.1208.jre7</postgres.connector.version>
- <spring.version>4.1.0.RELEASE</spring.version>
- <!-- Will be changed by profile activation. Allows to combine profiles. -->
- <ml.folder>src/main/java</ml.folder>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
@@ -69,6 +60,12 @@
</dependency>
<dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-ml</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.yardstickframework</groupId>
<artifactId>yardstick</artifactId>
<version>${yardstick.version}</version>
@@ -123,63 +120,9 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>ml</id>
-
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
-
- <properties>
- <ml.folder>src/main/ml</ml.folder>
- <java.ver>1.8</java.ver>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.ignite</groupId>
- <artifactId>ignite-ml</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<build>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-sources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${ml.folder}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.8</version>
@@ -189,15 +132,6 @@
</plugin>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/DataChanger.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/DataChanger.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/DataChanger.java
new file mode 100644
index 0000000..600113b
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/DataChanger.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.yardstick.ml;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+
+/**
+ * Helps to ensure use of meaningfully different data in repeated invocations of benchmarked code in
+ * {@link IgniteAbstractBenchmark#test(Map)} method.
+ */
+public class DataChanger {
+ /** */
+ private static final AtomicInteger changer = new AtomicInteger(0);
+
+ /**
+ * @return Positive "seed" to mutate data.
+ */
+ public static double next() {
+ return (changer.incrementAndGet() % 17) + 1;
+ }
+
+ /** */
+ public static class Scale {
+ /** */
+ private final double scale;
+
+ /** */
+ public Scale() {
+ this.scale = DataChanger.next();
+ }
+
+ /** */
+ public double[][] mutate(double[][] orig) {
+ for (int i = 0; i < orig.length; i++)
+ orig[i] = mutate(orig[i]);
+
+ return orig;
+ }
+
+ /** */
+ public double[] mutate(double[] orig) {
+ for (int i = 0; i < orig.length; i++)
+ orig[i] *= scale;
+
+ return orig;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java
new file mode 100644
index 0000000..de928e8
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansDistributedClustererBenchmark.java
@@ -0,0 +1,75 @@
+/*
+ * 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.yardstick.ml.clustering;
+
+import java.util.Map;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.ml.clustering.KMeansDistributedClusterer;
+import org.apache.ignite.ml.math.StorageConstants;
+import org.apache.ignite.ml.math.distances.EuclideanDistance;
+import org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix;
+import org.apache.ignite.resources.IgniteInstanceResource;
+import org.apache.ignite.thread.IgniteThread;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteKMeansDistributedClustererBenchmark extends IgniteAbstractBenchmark {
+ /** */
+ @IgniteInstanceResource
+ private Ignite ignite;
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ final DataChanger.Scale scale = new DataChanger.Scale();
+
+ // Create IgniteThread, we must work with SparseDistributedMatrix inside IgniteThread
+ // because we create ignite cache internally.
+ IgniteThread igniteThread = new IgniteThread(ignite.configuration().getIgniteInstanceName(),
+ this.getClass().getSimpleName(), new Runnable() {
+ /** {@inheritDoc} */
+ @Override public void run() {
+ // IMPL NOTE originally taken from KMeansDistributedClustererTest
+ KMeansDistributedClusterer clusterer = new KMeansDistributedClusterer(
+ new EuclideanDistance(), 1, 1, 1L);
+
+ double[] v1 = scale.mutate(new double[] {1959, 325100});
+ double[] v2 = scale.mutate(new double[] {1960, 373200});
+
+ SparseDistributedMatrix points = new SparseDistributedMatrix(
+ 2, 2, StorageConstants.ROW_STORAGE_MODE, StorageConstants.RANDOM_ACCESS_MODE);
+
+ points.setRow(0, v1);
+ points.setRow(1, v2);
+
+ clusterer.cluster(points, 1);
+
+ points.destroy();
+ }
+ });
+
+ igniteThread.start();
+
+ igniteThread.join();
+
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java
new file mode 100644
index 0000000..d68fc6d
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/IgniteKMeansLocalClustererBenchmark.java
@@ -0,0 +1,50 @@
+/*
+ * 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.yardstick.ml.clustering;
+
+import java.util.Map;
+import org.apache.ignite.ml.clustering.KMeansLocalClusterer;
+import org.apache.ignite.ml.math.distances.EuclideanDistance;
+import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteKMeansLocalClustererBenchmark extends IgniteAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ final DataChanger.Scale scale = new DataChanger.Scale();
+
+ // IMPL NOTE originally taken from KMeansLocalClustererTest
+ KMeansLocalClusterer clusterer = new KMeansLocalClusterer(new EuclideanDistance(), 1, 1L);
+
+ double[] v1 = scale.mutate(new double[] {1959, 325100});
+ double[] v2 = scale.mutate(new double[] {1960, 373200});
+
+ DenseLocalOnHeapMatrix points = new DenseLocalOnHeapMatrix(new double[][] {
+ v1,
+ v2});
+
+ clusterer.cluster(points, 1);
+
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java
new file mode 100644
index 0000000..af217d2
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/clustering/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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 description. -->
+ * ML Grid clustering benchmarks.
+ */
+package org.apache.ignite.yardstick.ml.clustering;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteCholeskyDecompositionBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteCholeskyDecompositionBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteCholeskyDecompositionBenchmark.java
new file mode 100644
index 0000000..6997180
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteCholeskyDecompositionBenchmark.java
@@ -0,0 +1,69 @@
+/*
+ * 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.yardstick.ml.decomposition;
+
+import java.util.Map;
+import org.apache.ignite.ml.math.Matrix;
+import org.apache.ignite.ml.math.Vector;
+import org.apache.ignite.ml.math.decompositions.CholeskyDecomposition;
+import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix;
+import org.apache.ignite.ml.math.impls.vector.DenseLocalOnHeapVector;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteCholeskyDecompositionBenchmark extends IgniteAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ runCholeskyDecomposition();
+
+ return true;
+ }
+
+ /**
+ * Based on CholeskyDecompositionTest.
+ */
+ private void runCholeskyDecomposition() {
+ final DataChanger.Scale scale = new DataChanger.Scale();
+
+ Matrix m = new DenseLocalOnHeapMatrix(scale.mutate(new double[][] {
+ {2.0d, -1.0d, 0.0d},
+ {-1.0d, 2.0d, -1.0d},
+ {0.0d, -1.0d, 2.0d}
+ }));
+
+ CholeskyDecomposition dec = new CholeskyDecomposition(m);
+
+ dec.getL();
+ dec.getLT();
+
+ Matrix bs = new DenseLocalOnHeapMatrix(scale.mutate(new double[][] {
+ {4.0, -6.0, 7.0},
+ {1.0, 1.0, 1.0}
+ })).transpose();
+ dec.solve(bs);
+
+ Vector b = new DenseLocalOnHeapVector(scale.mutate(new double[] {4.0, -6.0, 7.0}));
+ dec.solve(b);
+
+ dec.destroy();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteEigenDecompositionBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteEigenDecompositionBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteEigenDecompositionBenchmark.java
new file mode 100644
index 0000000..e61c40c
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteEigenDecompositionBenchmark.java
@@ -0,0 +1,69 @@
+/*
+ * 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.yardstick.ml.decomposition;
+
+import java.util.Map;
+import org.apache.ignite.ml.math.decompositions.EigenDecomposition;
+import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteEigenDecompositionBenchmark extends IgniteAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ runEigenDecomposition();
+
+ return true;
+ }
+
+ /**
+ * Based on EigenDecompositionTest.
+ */
+ private void runEigenDecomposition() {
+ final DataChanger.Scale scale = new DataChanger.Scale();
+
+ EigenDecomposition decomposition1 = new EigenDecomposition(new DenseLocalOnHeapMatrix(
+ scale.mutate(new double[][] {
+ {1.0d, 0.0d, 0.0d, 1.0d},
+ {0.0d, 1.0d, 0.0d, 1.0d},
+ {0.0d, 0.0d, 2.0d, 0.0d},
+ {1.0d, 1.0d, 0.0d, 2.0d}})));
+
+ decomposition1.getD();
+ decomposition1.getV();
+
+ decomposition1.destroy();
+
+ EigenDecomposition decomposition2 = new EigenDecomposition(new DenseLocalOnHeapMatrix(
+ scale.mutate(new double[][] {
+ {1.0d, 0.0d, 0.0d},
+ {0.0d, 1.0d, 0.0d},
+ {0.0d, 0.0d, 2.0d},
+ {1.0d, 1.0d, 0.0d}})));
+ // TODO: IGNITE-5828, find out why decomposition of 3X4 matrix throws row index exception
+
+ decomposition2.getD();
+ decomposition2.getV();
+
+ decomposition2.destroy();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteLUDecompositionBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteLUDecompositionBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteLUDecompositionBenchmark.java
new file mode 100644
index 0000000..1368ef9
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteLUDecompositionBenchmark.java
@@ -0,0 +1,75 @@
+/*
+ * 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.yardstick.ml.decomposition;
+
+import java.util.Map;
+import org.apache.ignite.ml.math.Matrix;
+import org.apache.ignite.ml.math.decompositions.LUDecomposition;
+import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix;
+import org.apache.ignite.ml.math.impls.matrix.PivotedMatrixView;
+import org.apache.ignite.ml.math.impls.vector.DenseLocalOnHeapVector;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteLUDecompositionBenchmark extends IgniteAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ runLUDecomposition();
+
+ return true;
+ }
+
+ /**
+ * Based on LUDecompositionTest.
+ */
+ private void runLUDecomposition() {
+ Matrix testMatrix = new DenseLocalOnHeapMatrix(new DataChanger.Scale().mutate(new double[][] {
+ {2.0d, 1.0d, 1.0d, 0.0d},
+ {4.0d, 3.0d, 3.0d, 1.0d},
+ {8.0d, 7.0d, 9.0d, 5.0d},
+ {6.0d, 7.0d, 9.0d, 8.0d}}));
+
+ LUDecomposition dec1 = new LUDecomposition(new PivotedMatrixView(testMatrix));
+
+ dec1.solve(new DenseLocalOnHeapVector(testMatrix.rowSize()));
+
+ dec1.destroy();
+
+ LUDecomposition dec2 = new LUDecomposition(new PivotedMatrixView(testMatrix));
+
+ dec2.solve(new DenseLocalOnHeapMatrix(testMatrix.rowSize(), testMatrix.rowSize()));
+
+ dec2.destroy();
+
+ LUDecomposition dec3 = new LUDecomposition(testMatrix);
+
+ dec3.getL();
+
+ dec3.getU();
+
+ dec3.getP();
+
+ dec3.getPivot();
+
+ dec3.destroy();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteSingularValueDecompositionBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteSingularValueDecompositionBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteSingularValueDecompositionBenchmark.java
new file mode 100644
index 0000000..9f02852
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/IgniteSingularValueDecompositionBenchmark.java
@@ -0,0 +1,59 @@
+/*
+ * 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.yardstick.ml.decomposition;
+
+import java.util.Map;
+import org.apache.ignite.ml.math.Matrix;
+import org.apache.ignite.ml.math.decompositions.SingularValueDecomposition;
+import org.apache.ignite.ml.math.impls.matrix.DenseLocalOnHeapMatrix;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.apache.ignite.yardstick.ml.DataChanger;
+
+/**
+ * Ignite benchmark that performs ML Grid operations.
+ */
+@SuppressWarnings("unused")
+public class IgniteSingularValueDecompositionBenchmark extends IgniteAbstractBenchmark {
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ runSingularValueDecomposition();
+
+ return true;
+ }
+
+ /**
+ * Based on SingularValueDecompositionTest#basicTest.
+ */
+ private void runSingularValueDecomposition() {
+ Matrix m = new DenseLocalOnHeapMatrix(new DataChanger.Scale().mutate(new double[][] {
+ {2.0d, -1.0d, 0.0d},
+ {-1.0d, 2.0d, -1.0d},
+ {0.0d, -1.0d, 2.0d}
+ }));
+
+ SingularValueDecomposition dec = new SingularValueDecomposition(m);
+
+ Matrix s = dec.getS();
+ Matrix u = dec.getU();
+ Matrix v = dec.getV();
+
+ u.times(s).times(v.transpose());
+
+ dec.destroy();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/43a62cdb/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/package-info.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/package-info.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/package-info.java
new file mode 100644
index 0000000..4aaece3
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/ml/decomposition/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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 description. -->
+ * ML Grid decomposition benchmarks.
+ */
+package org.apache.ignite.yardstick.ml.decomposition;
\ No newline at end of file