I am prototyping something using Spring-Boot 1.2.7.RELEASE and Apache Ignite 1.4.0 and noticed something a bit strange, maybe it's just a logging configuration.
Looks like Apache Ignite is trying to run twice using Spring? If I comment on the line SpringApplication.run, then it looks like it starts only once. Maybe I'm not using Spring with Apache Ignite correctly?
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>IgniteDemo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<ignite.version>1.4.0</ignite.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-core</artifactId>
<version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-spring</artifactId>
<version>${ignite.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
IgniteDemoApplication
package com.example;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteException;
import org.apache.ignite.Ignition;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class IgniteDemoApplication {
public static void main(String[] args) throws IgniteException {
SpringApplication.run(IgniteDemoApplication.class, args);
try(Ignite ignite = Ignition.start("C:\\opt\\apache-ignite-fabric-1.4.0-bin\\examples\\config\\example-ignite.xml")){
ignite.compute().broadcast(() -> System.out.println("Hello World!"));
}
}
}
Exit
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.2.7.RELEASE)
2015-11-01 21:19:56.182 INFO 7024
2015-11-01 21:19:56.223 INFO 7024
2015-11-01 21:19:56.963 INFO 7024
2015-11-01 21:19:56.973 INFO 7024
2015-11-01 21:19:57.044 INFO 7024
2015-11-01 21:19:57.164 INFO 7024
2015-11-01 21:19:57.264 ERROR 7024
Console logging handler is not configured.
2015-11-01 21:19:57.325 INFO 7024
>>> __________ ________________
>>> / _/ ___/ |/ / _/_ __/ __/
>>> _/ // (7 7 // / / / / _/
>>> /___/\___/_/|_/___/ /_/ /___/
>>>
>>> ver. 1.4.0
>>> 2015 Copyright(C) Apache Software Foundation
>>>
>>> Ignite documentation: http://ignite.apache.org
[21:19:57] __________ ________________
[21:19:57] / _/ ___/ |/ / _/_ __/ __/
[21:19:57] _/ // (7 7 // / / / / _/
[21:19:57] /___/\___/_/|_/___/ /_/ /___/
[21:19:57]
[21:19:57] ver. 1.4.0
[21:19:57] 2015 Copyright(C) Apache Software Foundation
[21:19:57]
[21:19:57] Ignite documentation: http://ignite.apache.org
[21:19:57]
[21:19:57] Quiet mode.
[21:19:57] ^
[21:19:57]
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 INFO 7024
2015-11-01 21:19:57.325 WARN 7024
2015-11-01 21:19:57.335 WARN 7024
[21:19:57] Initial heap size is 192MB (should be no less than 512MB, use -Xms512m -Xmx512m).
2015-11-01 21:19:58.601 INFO 7024
2015-11-01 21:19:58.601 INFO 7024
[21:19:58] Configured plugins:
2015-11-01 21:19:58.601 INFO 7024
[21:19:58] ^
2015-11-01 21:19:58.601 INFO 7024
[21:19:58]
2015-11-01 21:19:58.601 INFO 7024
2015-11-01 21:19:58.802 INFO 7024
2015-11-01 21:19:59.872 WARN 7024
2015-11-01 21:19:59.913 WARN 7024
2015-11-01 21:19:59.913 WARN 7024
[21:19:59] Security status [authentication=off, communication encryption=off]
2015-11-01 21:19:59.913 INFO 7024
2015-11-01 21:20:00.083 INFO 7024
2015-11-01 21:20:00.133 INFO 7024
2015-11-01 21:20:03.071 INFO 7024
2015-11-01 21:20:03.084 INFO 7024
2015-11-01 21:20:03.098 INFO 7024
2015-11-01 21:20:03.224 INFO 7024
2015-11-01 21:20:03.225 INFO 7024
2015-11-01 21:20:03.225 INFO 7024
2015-11-01 21:20:03.281 INFO 7024
2015-11-01 21:20:03.290 INFO 7024
2015-11-01 21:20:03.302 INFO 7024
[21:20:03] Performance suggestions for grid (fix if possible)
2015-11-01 21:20:03.349 INFO 7024
[21:20:03] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
2015-11-01 21:20:03.349 INFO 7024
[21:20:03] ^
2015-11-01 21:20:03.349 INFO 7024
[21:20:03] ^
2015-11-01 21:20:03.349 INFO 7024
[21:20:03]
2015-11-01 21:20:03.349 INFO 7024
[21:20:03] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
2015-11-01 21:20:03.350 INFO 7024
[21:20:03]
[21:20:03] Ignite node started OK (id=a4028962)
2015-11-01 21:20:03.350 INFO 7024
2015-11-01 21:20:03.351 INFO 7024
>>> +
>>> Ignite ver. 1.4.0
>>> +
>>> OS name: Windows 7 6.1 amd64
>>> CPU(s): 8
>>> Heap: 2.7GB
>>> VM name: 7024@User-PC
>>> Grid name: null
>>> Local node [ID=A4028962-807E-4011-BA64-B923B57DD8EA, order=14, clientMode=false]
>>> Local node addresses: [User-PC.cable.rcn.com/0:0:0:0:0:0:0:1, /127.0.0.1, /192.168.1.136]
>>> Local ports: TCP:11212 TCP:47101 UDP:47400 TCP:47501
[21:20:03] Topology snapshot [ver=14, servers=2, clients=0, CPUs=8, heap=3.7GB]
2015-11-01 21:20:03.352 INFO 7024
2015-11-01 21:20:03.359 INFO 7024
Hello World!
2015-11-01 21:20:03.442 INFO 7024
2015-11-01 21:20:03.459 WARN 7024
[21:20:03] Unknown connection detected (is some other software connecting to this Ignite port? missing SSL configuration on remote node?) [rmtAddr=/0:0:0:0:0:0:0:1]
2015-11-01 21:20:03.466 INFO 7024
2015-11-01 21:20:03.472 INFO 7024
2015-11-01 21:20:03.473 INFO 7024
2015-11-01 21:20:03.475 INFO 7024
[21:20:03] Ignite node stopped OK [uptime=00:00:00:132]
2015-11-01 21:20:03.482 INFO 7024
>>> +
>>> Ignite ver. 1.4.0
>>> +
>>> Grid name: null
>>> Grid uptime: 00:00:00:132
2015-11-01 21:20:03.600 INFO 7024
2015-11-01 21:20:03.601 INFO 7024
source
share