Skip to content

Commit

Permalink
Merge branch 'master' into remove_datanode
Browse files Browse the repository at this point in the history
  • Loading branch information
HxpSerein committed Sep 30, 2024
2 parents f87de68 + b488a79 commit 2412cc6
Show file tree
Hide file tree
Showing 205 changed files with 6,909 additions and 1,187 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow will check if dependencies have changed (adding new dependencies or removing existing ones)

name: Dependency Check

on:
push:
branches:
- master
- 'rel/*'
- "rc/*"
paths-ignore:
- 'docs/**'
- 'site/**'
pull_request:
branches:
- master
- 'rel/*'
- "rc/*"
paths-ignore:
- 'docs/**'
- 'site/**'
# allow manually run the action:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}

jobs:
dependency-check:
strategy:
fail-fast: false
max-parallel: 15
matrix:
java: [ 17 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Do the dependency check
shell: bash
run: mvn verify -Dmaven.test.skip=true -Dmdep.analyze.skip=true -P enable-sbom-check
167 changes: 167 additions & 0 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"dependencies": [
"cglib:cglib",
"ch.qos.logback:logback-classic",
"ch.qos.logback:logback-core",
"ch.qos.reload4j:reload4j",
"com.bugsnag:bugsnag",
"com.digitalpetri.fsm:strict-machine",
"com.digitalpetri.netty:netty-channel-fsm",
"com.fasterxml.jackson.core:jackson-annotations",
"com.fasterxml.jackson.core:jackson-core",
"com.fasterxml.jackson.core:jackson-databind",
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310",
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-base",
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider",
"com.fasterxml.jackson.module:jackson-module-jaxb-annotations",
"com.github.ben-manes.caffeine:caffeine",
"com.github.luben:zstd-jni",
"com.github.stephenc.jcip:jcip-annotations",
"com.github.wendykierp:JTransforms",
"com.google.code.findbugs:jsr305",
"com.google.code.gson:gson",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:failureaccess",
"com.google.guava:guava",
"com.google.guava:listenablefuture",
"com.google.j2objc:j2objc-annotations",
"com.h2database:h2-mvstore",
"com.librato.metrics:librato-java",
"com.librato.metrics:metrics-librato",
"com.lmax:disruptor",
"com.nimbusds:content-type",
"com.nimbusds:lang-tag",
"com.nimbusds:nimbus-jose-jwt",
"com.nimbusds:oauth2-oidc-sdk",
"com.sun.istack:istack-commons-runtime",
"com.zaxxer:HikariCP",
"commons-cli:commons-cli",
"commons-codec:commons-codec",
"commons-io:commons-io",
"commons-logging:commons-logging",
"io.airlift:airline",
"io.airlift:concurrent",
"io.airlift:log",
"io.airlift:units",
"io.dropwizard.metrics:metrics-core",
"io.dropwizard.metrics:metrics-jvm",
"io.jsonwebtoken:jjwt-api",
"io.micrometer:micrometer-commons",
"io.micrometer:micrometer-core",
"io.micrometer:micrometer-observation",
"io.moquette:moquette-broker",
"io.netty:netty-buffer",
"io.netty:netty-codec",
"io.netty:netty-codec-dns",
"io.netty:netty-codec-http",
"io.netty:netty-codec-http2",
"io.netty:netty-codec-mqtt",
"io.netty:netty-codec-socks",
"io.netty:netty-common",
"io.netty:netty-handler",
"io.netty:netty-handler-proxy",
"io.netty:netty-resolver",
"io.netty:netty-resolver-dns",
"io.netty:netty-resolver-dns-classes-macos",
"io.netty:netty-resolver-dns-native-macos",
"io.netty:netty-transport",
"io.netty:netty-transport-classes-epoll",
"io.netty:netty-transport-native-epoll",
"io.netty:netty-transport-native-unix-common",
"io.projectreactor:reactor-core",
"io.projectreactor.netty:reactor-netty-core",
"io.projectreactor.netty:reactor-netty-http",
"io.swagger:swagger-annotations",
"io.swagger:swagger-core",
"io.swagger:swagger-jaxrs",
"io.swagger:swagger-models",
"jakarta.activation:jakarta.activation-api",
"jakarta.annotation:jakarta.annotation-api",
"jakarta.servlet:jakarta.servlet-api",
"jakarta.validation:jakarta.validation-api",
"jakarta.ws.rs:jakarta.ws.rs-api",
"jakarta.xml.bind:jakarta.xml.bind-api",
"net.java.dev.jna:jna",
"net.minidev:accessors-smart",
"net.minidev:json-smart",
"org.antlr:antlr4-runtime",
"org.apache.commons:commons-collections4",
"org.apache.commons:commons-csv",
"org.apache.commons:commons-jexl3",
"org.apache.commons:commons-lang3",
"org.apache.commons:commons-math3",
"org.apache.commons:commons-pool2",
"org.apache.httpcomponents:httpclient",
"org.apache.httpcomponents:httpcore",
"org.apache.ratis:ratis-client",
"org.apache.ratis:ratis-common",
"org.apache.ratis:ratis-grpc",
"org.apache.ratis:ratis-metrics-api",
"org.apache.ratis:ratis-proto",
"org.apache.ratis:ratis-server",
"org.apache.ratis:ratis-server-api",
"org.apache.ratis:ratis-thirdparty-misc",
"org.apache.thrift:libthrift",
"org.apache.tsfile:common",
"org.apache.tsfile:tsfile",
"org.bouncycastle:bcpkix-jdk18on",
"org.bouncycastle:bcprov-jdk18on",
"org.bouncycastle:bcutil-jdk18on",
"org.checkerframework:checker-qual",
"org.eclipse.collections:eclipse-collections",
"org.eclipse.collections:eclipse-collections-api",
"org.eclipse.jetty:jetty-http",
"org.eclipse.jetty:jetty-io",
"org.eclipse.jetty:jetty-security",
"org.eclipse.jetty:jetty-server",
"org.eclipse.jetty:jetty-servlet",
"org.eclipse.jetty:jetty-util",
"org.eclipse.jetty:jetty-util-ajax",
"org.eclipse.milo:bsd-core",
"org.eclipse.milo:bsd-generator",
"org.eclipse.milo:sdk-client",
"org.eclipse.milo:sdk-core",
"org.eclipse.milo:sdk-server",
"org.eclipse.milo:stack-client",
"org.eclipse.milo:stack-core",
"org.eclipse.milo:stack-server",
"org.fusesource.hawtbuf:hawtbuf",
"org.fusesource.hawtdispatch:hawtdispatch",
"org.fusesource.hawtdispatch:hawtdispatch-transport",
"org.fusesource.mqtt-client:mqtt-client",
"org.glassfish.hk2:hk2-api",
"org.glassfish.hk2:hk2-locator",
"org.glassfish.hk2:hk2-utils",
"org.glassfish.hk2:osgi-resource-locator",
"org.glassfish.hk2.external:aopalliance-repackaged",
"org.glassfish.hk2.external:jakarta.inject",
"org.glassfish.jaxb:jaxb-runtime",
"org.glassfish.jaxb:txw2",
"org.glassfish.jersey.containers:jersey-container-servlet-core",
"org.glassfish.jersey.core:jersey-client",
"org.glassfish.jersey.core:jersey-common",
"org.glassfish.jersey.core:jersey-server",
"org.glassfish.jersey.inject:jersey-hk2",
"org.glassfish.jersey.media:jersey-media-multipart",
"org.hdrhistogram:HdrHistogram",
"org.java-websocket:Java-WebSocket",
"org.javassist:javassist",
"org.jline:jline",
"org.jvnet.mimepull:mimepull",
"org.latencyutils:LatencyUtils",
"org.lz4:lz4-java",
"org.ops4j.pax.jdbc:pax-jdbc-common",
"org.osgi:osgi.cmpn",
"org.osgi:osgi.core",
"org.ow2.asm:asm",
"org.reactivestreams:reactive-streams",
"org.reflections:reflections",
"org.slf4j:slf4j-api",
"org.slf4j:slf4j-reload4j",
"org.tukaani:xz",
"org.xerial.snappy:snappy-java",
"org.yaml:snakeyaml",
"pl.edu.icm:JLargeArrays"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,14 @@ public void testBigDateTime() {
e.printStackTrace();
fail();
}
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
statement.execute("insert into root.sg.d1(time,s2) values (16182830055860000000, 8.76);");
fail();
} catch (SQLException e) {
Assert.assertTrue(
e.getMessage()
.contains("please check whether the timestamp 16182830055860000000 is correct."));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@ public void test() {

@Test
public void testIllegalStorageGroup() {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
try (final Connection connection = EnvFactory.getEnv().getConnection();
final Statement statement = connection.createStatement()) {
statement.execute("CREATE DATABASE root.`\"ln`");
} catch (SQLException e) {
} catch (final SQLException e) {
Assert.assertTrue(
e.getMessage().contains("Error StorageGroup name")
|| e.getMessage()
.contains("The database name can only be characters, numbers and underscores."));
} catch (Exception e) {
.contains(
"The database name can only contain english or chinese characters, numbers, backticks and underscores."));
} catch (final Exception e) {
e.printStackTrace();
Assert.fail();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -470,7 +471,7 @@ public void testAlterPipeSourceAndProcessor() {
try (final Connection connection = senderEnv.getConnection();
final Statement statement = connection.createStatement()) {
statement.execute(sql);
} catch (SQLException e) {
} catch (final SQLException e) {
fail(e.getMessage());
}

Expand All @@ -491,12 +492,13 @@ public void testAlterPipeSourceAndProcessor() {
TestUtils.assertDataEventuallyOnEnv(
receiverEnv, "select * from root.db.**", "Time,root.db.d1.at1,", expectedResSet);

// Alter pipe (modify 'source.path' and 'processor.tumbling-time.interval-seconds')
// Alter pipe (modify 'source.path', 'source.inclusion' and
// 'processor.tumbling-time.interval-seconds')
try (final Connection connection = senderEnv.getConnection();
final Statement statement = connection.createStatement()) {
statement.execute(
"alter pipe a2b modify source('source' = 'iotdb-source','source.path'='root.db.d2.**') modify processor ('processor.tumbling-time.interval-seconds'='2')");
} catch (SQLException e) {
"alter pipe a2b modify source('source' = 'iotdb-source','source.path'='root.db.d2.**', 'source.inclusion'='all') modify processor ('processor.tumbling-time.interval-seconds'='2')");
} catch (final SQLException e) {
fail(e.getMessage());
}

Expand Down Expand Up @@ -527,5 +529,15 @@ public void testAlterPipeSourceAndProcessor() {
"select * from root.db.** where time > 10000",
"Time,root.db.d1.at1,root.db.d2.at1,",
expectedResSet);

// Create database on sender
if (!TestUtils.tryExecuteNonQueryWithRetry(
senderEnv, "create timeSeries root.db.d2.at2 int32")) {
fail();
}

// Check database on receiver
TestUtils.assertDataEventuallyOnEnv(
receiverEnv, "count timeSeries", "count(timeseries),", Collections.singleton("3,"));
}
}
Loading

0 comments on commit 2412cc6

Please sign in to comment.