Spark graphx moved to a new project due to a incompatibility of scala compiler

This commit is contained in:
Norberto Ritzmann Jr
2019-10-06 21:57:54 +02:00
parent db85c8f275
commit 45be61376e
20299 changed files with 1635696 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
HELP.md
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/
### VS Code ###
.vscode/
+9
View File
@@ -0,0 +1,9 @@
## Spring Boot Operations
This module contains articles about Spring Boot Operations
### Relevant Articles
- [How to Configure Spring Boot Tomcat](https://www.baeldung.com/spring-boot-configure-tomcat)
- [Spring Boot Embedded Tomcat Logs](https://www.baeldung.com/spring-boot-embedded-tomcat-logs)
- More articles: [[<-- prev]](/spring-boot-ops)
+40
View File
@@ -0,0 +1,40 @@
<?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.baeldung</groupId>
<artifactId>spring-boot-ops-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>spring-boot-ops-2</name>
<parent>
<artifactId>parent-boot-2</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</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>
@@ -0,0 +1,12 @@
package com.baeldung.gracefulshutdown;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class GracefulShutdownApplication {
public static void main(String args[]) {
SpringApplication.run(GracefulShutdownApplication.class, args);
}
}
@@ -0,0 +1,36 @@
package com.baeldung.gracefulshutdown.beans;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Component;
@Component
public class LongRunningProcessBean {
private static final Logger LOG = LoggerFactory.getLogger(LongRunningProcessBean.class);
@Autowired
private TaskExecutor taskExecutor;
@PostConstruct
public void runTaskOnStartup() {
LOG.info("runTaskOnStartup entering");
for (int i = 0; i < 3; i++) {
final int processNumber = i;
taskExecutor.execute(() -> {
try {
LOG.info("Long running process {} using threadpool started", processNumber);
Thread.sleep(60_000);
LOG.info("Long running process {} using threadpool completed", processNumber);
} catch (Exception e) {
LOG.error("Error while executing task", e);
}
});
}
LOG.info("runTaskOnStartup exiting");
}
}
@@ -0,0 +1,32 @@
package com.baeldung.gracefulshutdown.config;
import javax.annotation.PreDestroy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.TaskExecutor;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
public class SpringConfiguration {
private static final Logger LOG = LoggerFactory.getLogger(SpringConfiguration.class);
@Bean
public TaskExecutor taskExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(2);
taskExecutor.setMaxPoolSize(2);
taskExecutor.setWaitForTasksToCompleteOnShutdown(true);
taskExecutor.setAwaitTerminationSeconds(30);
taskExecutor.initialize();
return taskExecutor;
}
@PreDestroy
public void destroy() {
LOG.info("Shutdown initiated");
}
}
@@ -0,0 +1,13 @@
package com.baeldung.springbootconfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootConfigurationApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootConfigurationApplication.class, args);
}
}
@@ -0,0 +1,14 @@
package com.baeldung.springbootconfiguration.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class GreetingsController {
@GetMapping("/greetings/{username}")
public String getGreetings(@PathVariable("username") String userName) {
return "Hello " + userName + ", Good day...!!!";
}
}
@@ -0,0 +1,29 @@
# server configuration
server.port=4010
server.address=127.0.0.1
## Error handling configuration
server.error.whitelabel.enabled=true
server.error.path=/user-error
server.error.include-exception=true
server.error.include-stacktrace=always
## Server connections configuration
server.tomcat.max-threads=200
server.connection-timeout=5s
server.max-http-header-size=8KB
server.tomcat.max-swallow-size=2MB
server.tomcat.max-http-post-size=2MB
## Access logs configuration
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.directory=logs
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
server.tomcat.accesslog.prefix=access_log
server.tomcat.accesslog.suffix=.log
server.tomcat.accesslog.pattern=common
server.tomcat.basedir=tomcat
## Tomcat internal server logs
logging.level.org.apache.tomcat=DEBUG
logging.level.org.apache.catalina=DEBUG
@@ -0,0 +1 @@
spring.profiles.active=tomcat
@@ -0,0 +1,15 @@
package com.baeldung.springbootconfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringContextIntegrationTest {
@Test
public void contextLoads() {
}
}
@@ -0,0 +1,15 @@
package com.baeldung.springbootconfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringContextTest {
@Test
public void contextLoads() {
}
}