Skip to content

hjfruit/testcontainers-doris

Repository files navigation

Testcontainers for doris

CI Nexus (Snapshots) Sonatype Nexus (Releases)

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Apache Doris is an easy-to-use, high-performance and real-time analytical database based on MPP architecture, known for its extreme speed and ease of use. It only requires a sub-second response time to return query results under massive data and can support not only high-concurrent point query scenarios but also high-throughput complex analysis scenarios.

Dependency

Support Java 8+, Scala 3, Scala 2.13 and Scala 2.12

sbt:

"io.github.jxnu-liguobin" %% "testcontainers-doris" % '0.0.0+13-ab677850-SNAPSHOT'

maven:

<dependency>
    <groupId>io.github.jxnu-liguobin</groupId>
    <artifactId>testcontainers-doris_2.13</artifactId>
    <version>'latest version'</version>
    <scope>test</scope>
</dependency>

gradle:

testImplementation group: 'io.github.jxnu-liguobin', name: 'testcontainers-doris_2.13', version: '0.0.0+13-ab677850-SNAPSHOT'

Usage Instructions

Java example: SimpleDorisCluster


Details:

1. `Doris1FE1BEClusterContainer.scala` creates two container instances: fe, be.
2. `DorisClusterContainer.scala` provides a generic definition, and any number of clusters can be created by implementing its abstraction methods, ports and volumes can be modified.