JAVA-2116: Split or move libraries-data-2 module (#9716)

* JAVA-2116: Move Java-R Integration to libraries-6 module

* JAVA-2116: Move Guide to JMapper to libraries-data module
This commit is contained in:
kwoyke 2020-07-17 03:46:41 +02:00 committed by GitHub
parent 2d8bc57689
commit 60ef1c8551
27 changed files with 79 additions and 75 deletions

View File

@ -15,4 +15,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [A Guide to the Reflections Library](https://www.baeldung.com/reflections-library)
- [Exactly Once Processing in Kafka](https://www.baeldung.com/kafka-exactly-once)
- [Introduction to Protonpack](https://www.baeldung.com/java-protonpack)
- [Java-R Integration](https://www.baeldung.com/java-r-integration)
- More articles [[<-- prev]](/libraries-5)

View File

@ -92,8 +92,50 @@
<version>${commonsio.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.rosuda.REngine</groupId>
<artifactId>Rserve</artifactId>
<version>${rserve.version}</version>
</dependency>
<dependency>
<groupId>com.github.jbytecode</groupId>
<artifactId>RCaller</artifactId>
<version>${rcaller.version}</version>
</dependency>
<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>${renjin.version}</version>
</dependency>
</dependencies>
<repositories>
<!-- Needed for Renjin -->
<repository>
<id>bedatadriven</id>
<name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- Excludes FastR classes from compilations since they require GraalVM -->
<excludes>
<exclude>com/baeldung/r/FastRMean.java</exclude>
</excludes>
<testExcludes>
<exclude>com/baeldung/r/FastRMeanUnitTest.java</exclude>
</testExcludes>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<kafka.version>2.0.0</kafka.version>
<javapoet.version>1.10.0</javapoet.version>
@ -105,6 +147,9 @@
<commons-net.version>3.6</commons-net.version>
<assertj.version>3.6.2</assertj.version>
<commonsio.version>2.6</commonsio.version>
<renjin.version>RELEASE</renjin.version>
<rcaller.version>3.0</rcaller.version>
<rserve.version>1.8.1</rserve.version>
</properties>

View File

@ -1,8 +1,5 @@
package com.baeldung.r;
import java.io.IOException;
import java.net.URISyntaxException;
/**
* FastR showcase.
*

View File

@ -1,12 +1,12 @@
package com.baeldung.r;
import java.io.IOException;
import java.net.URISyntaxException;
import com.github.rcaller.rstuff.RCaller;
import com.github.rcaller.rstuff.RCallerOptions;
import com.github.rcaller.rstuff.RCode;
import java.io.IOException;
import java.net.URISyntaxException;
/**
* RCaller showcase.
*

View File

@ -1,13 +1,12 @@
package com.baeldung.r;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.script.ScriptException;
import org.renjin.script.RenjinScriptEngine;
import org.renjin.sexp.DoubleArrayVector;
import javax.script.ScriptException;
import java.io.IOException;
import java.net.URISyntaxException;
/**
* Renjin showcase.
*

View File

@ -1,14 +1,13 @@
package com.baeldung.r;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.script.ScriptException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import javax.script.ScriptException;
import java.io.IOException;
import java.net.URISyntaxException;
/**
* Test for {@link RCallerMean}.
*

View File

@ -1,13 +1,11 @@
package com.baeldung.r;
import java.io.IOException;
import java.net.URISyntaxException;
import javax.script.ScriptException;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Assert;
import javax.script.ScriptException;
import java.io.IOException;
import java.net.URISyntaxException;
/**
* Test for {@link RenjinMean}.

View File

@ -8,10 +8,8 @@ This module contains articles about libraries for data processing in Java.
- [Introduction to Conflict-Free Replicated Data Types](https://www.baeldung.com/java-conflict-free-replicated-data-types)
- [Introduction to javax.measure](https://www.baeldung.com/javax-measure)
- [A Guide to Infinispan in Java](https://www.baeldung.com/infinispan)
- [Guide to JMapper](https://www.baeldung.com/jmapper)
- [An Introduction to SuanShu](https://www.baeldung.com/suanshu)
- [Intro to Derive4J](https://www.baeldung.com/derive4j)
- [Java-R Integration](https://www.baeldung.com/java-r-integration)
- [Univocity Parsers](https://www.baeldung.com/java-univocity-parsers)
- [Using Kafka MockConsumer](https://www.baeldung.com/kafka-mockconsumer)
- [Using Kafka MockProducer](https://www.baeldung.com/kafka-mockproducer)

View File

@ -86,11 +86,6 @@
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.jmapper-framework</groupId>
<artifactId>jmapper-core</artifactId>
<version>${jmapper.version}</version>
</dependency>
<dependency>
<groupId>com.numericalmethod</groupId>
<artifactId>suanshu</artifactId>
@ -126,6 +121,11 @@
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
@ -138,21 +138,6 @@
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.rosuda.REngine</groupId>
<artifactId>Rserve</artifactId>
<version>${rserve.version}</version>
</dependency>
<dependency>
<groupId>com.github.jbytecode</groupId>
<artifactId>RCaller</artifactId>
<version>${rcaller.version}</version>
</dependency>
<dependency>
<groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId>
<version>${renjin.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
@ -175,33 +160,8 @@
<url>http://repo.numericalmethod.com/maven/</url>
<layout>default</layout>
</repository>
<!-- Needed for Renjin -->
<repository>
<id>bedatadriven</id>
<name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- Excludes FastR classes from compilations since they require GraalVM -->
<excludes>
<exclude>com/baeldung/r/FastRMean.java</exclude>
</excludes>
<testExcludes>
<exclude>com/baeldung/r/FastRMeanUnitTest.java</exclude>
</testExcludes>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<flink.version>1.5.0</flink.version>
<hll.version>1.6.0</hll.version>
@ -210,17 +170,14 @@
<infinispan.version>9.1.5.Final</infinispan.version>
<jackson.version>2.9.8</jackson.version>
<spring.version>4.3.8.RELEASE</spring.version>
<jmapper.version>1.6.0.1</jmapper.version>
<suanshu.version>4.0.0</suanshu.version>
<derive4j.version>1.1.0</derive4j.version>
<assertj.version>3.6.2</assertj.version>
<slf4j.version>1.7.25</slf4j.version>
<awaitility.version>3.0.0</awaitility.version>
<univocity.version>2.8.4</univocity.version>
<renjin.version>RELEASE</renjin.version>
<rcaller.version>3.0</rcaller.version>
<rserve.version>1.8.1</rserve.version>
<kafka.version>2.5.0</kafka.version>
<guava.version>29.0-jre</guava.version>
</properties>
</project>

View File

@ -12,4 +12,5 @@ This module contains articles about libraries for data processing in Java.
- [Introduction to Kafka Connectors](https://www.baeldung.com/kafka-connectors-guide)
- [Kafka Connect Example with MQTT and MongoDB](https://www.baeldung.com/kafka-connect-mqtt-mongodb)
- [Building a Data Pipeline with Flink and Kafka](https://www.baeldung.com/kafka-flink-data-pipeline)
- [Guide to JMapper](https://www.baeldung.com/jmapper)
More articles: [[next -->]](/../libraries-data-2)

View File

@ -126,6 +126,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.googlecode.jmapper-framework</groupId>
<artifactId>jmapper-core</artifactId>
<version>${jmapper.version}</version>
</dependency>
</dependencies>
<build>
@ -172,6 +177,7 @@
<org.apache.crunch.crunch-core.version>0.15.0</org.apache.crunch.crunch-core.version>
<org.apache.hadoop.hadoop-client>2.2.0</org.apache.hadoop.hadoop-client>
<slf4j.version>1.7.25</slf4j.version>
<jmapper.version>1.6.0.1</jmapper.version>
</properties>
</project>

View File

@ -7,6 +7,9 @@ import org.junit.Test;
import java.time.LocalDate;
import static com.googlecode.jmapper.api.JMapperAPI.*;
import static com.googlecode.jmapper.api.JMapperAPI.attribute;
import static com.googlecode.jmapper.api.JMapperAPI.global;
import static com.googlecode.jmapper.api.JMapperAPI.mappedClass;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -55,8 +55,8 @@ public class JMapperRelationalIntegrationTest {
public void givenUser_whenUseApi_thenConverted(){
JMapperAPI jmapperApi = new JMapperAPI()
.add(mappedClass(User.class)
.add(attribute("id").value("id").targetClasses(UserDto1.class,UserDto2.class))
.add(attribute("email").targetAttributes("username","email").targetClasses(UserDto1.class,UserDto2.class)) )
.add(attribute("id").value("id").targetClasses(UserDto1.class, UserDto2.class))
.add(attribute("email").targetAttributes("username","email").targetClasses(UserDto1.class, UserDto2.class)) )
;
RelationalJMapper<User> relationalMapper = new RelationalJMapper<>(User.class,jmapperApi);