hailin0 commented on code in PR #4049:
URL:
https://github.com/apache/incubator-seatunnel/pull/4049#discussion_r1098111225
##########
tools/update_modules_check/update_modules_check.py:
##########
@@ -150,6 +150,7 @@ def get_deleted_modules(files):
def get_sub_it_modules(modules, total_num, current_num):
modules_arr = modules.split(",")
+ modules_arr.remove("connector-jdbc-e2e")
Review Comment:
revert
##########
.github/workflows/backend.yml:
##########
@@ -529,3 +529,27 @@ jobs:
./mvnw -T 1C -B verify -DskipUT=true -DskipIT=false
-D"checkstyle.skip"=true -D"license.skipAddThirdParty"=true
--no-snapshot-updates -pl $run_it_modules -am -Pci
env:
MAVEN_OPTS: -Xmx4096m
+
+ jdbc-connectors-it:
Review Comment:
revert?
https://github.com/apache/incubator-seatunnel/pull/4068
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-hbase-e2e/src/test/java/org/apache/seatunnel/e2e/connector/hbase/HbaseIT.java:
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.e2e.connector.hbase;
+
+import org.apache.seatunnel.e2e.common.TestResource;
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
+import org.apache.hadoop.hbase.io.compress.Compression;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.testcontainers.lifecycle.Startables;
+import org.testcontainers.utility.DockerImageName;
+import org.testcontainers.utility.DockerLoggerFactory;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Objects;
+import java.util.stream.Stream;
+
+@Slf4j
+@Disabled("Hbase docker e2e case need user add mapping information of between
container id and ip address in hosts file")
+public class HbaseIT extends TestSuiteBase implements TestResource {
+
+ private static final String IMAGE = "harisekhon/hbase";
+
+ private static final int PORT = 2181;
+
+ private static final String HOST = "hbase-e2e";
+
+ private static final String TABLE_NAME = "seatunnel_test";
+
+ private static final String FAMILY_NAME = "info";
+
+ private final Configuration hbaseConfiguration =
HBaseConfiguration.create();
+
+ private Connection hbaseConnection;
+
+ private Admin admin;
+
+ private GenericContainer<?> hbaseContainer;
+
+ @BeforeAll
+ @Override
+ public void startUp() throws Exception {
+ hbaseContainer = new GenericContainer<>(DockerImageName.parse(IMAGE))
+ .withNetwork(NETWORK)
+ .withNetworkAliases(HOST)
+ .withExposedPorts(PORT)
+ .withLogConsumer(new
Slf4jLogConsumer(DockerLoggerFactory.getLogger(IMAGE)))
+ .waitingFor(new
HostPortWaitStrategy().withStartupTimeout(Duration.ofMinutes(2)));
+ Startables.deepStart(Stream.of(hbaseContainer)).join();
+ log.info("Hbase container started");
+ this.initialize();
+ }
+
+ @AfterAll
+ @Override
+ public void tearDown() throws Exception {
+ if (Objects.nonNull(admin)) {
+ admin.close();
+ }
+ if (Objects.nonNull(hbaseConnection)) {
+ hbaseConnection.close();
+ }
+ if (Objects.nonNull(hbaseContainer)) {
+ hbaseContainer.close();
+ }
+ }
+
+ private void initialize() throws IOException {
+ hbaseConfiguration.set("hbase.zookeeper.quorum", HOST + ":" + PORT);
+ hbaseConnection =
ConnectionFactory.createConnection(hbaseConfiguration);
+ admin = hbaseConnection.getAdmin();
+ TableName table = TableName.valueOf(TABLE_NAME);
+ ColumnFamilyDescriptor familyDescriptor =
ColumnFamilyDescriptorBuilder.newBuilder(FAMILY_NAME.getBytes())
+ .setCompressionType(Compression.Algorithm.SNAPPY)
+ .setCompactionCompressionType(Compression.Algorithm.SNAPPY)
+ .build();
+ TableDescriptor tableDescriptor =
TableDescriptorBuilder.newBuilder(table)
+ .setColumnFamily(familyDescriptor)
+ .build();
+ admin.createTable(tableDescriptor);
+ log.info("Hbase table has been initialized");
+ }
+
+ @TestTemplate
+ public void testHbaseSink(TestContainer container) throws IOException,
InterruptedException {
+ Container.ExecResult execResult =
container.executeJob("/fake-to-hbase.conf");
+ Assertions.assertEquals(0, execResult.getExitCode());
Review Comment:
add data rows & fields validate
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-elasticsearch-e2e/src/test/java/org/apache/seatunnel/e2e/connector/elasticsearch/ElasticsearchIT.java:
##########
@@ -71,8 +74,10 @@ public void startUp() throws Exception {
.withEnv("cluster.routing.allocation.disk.threshold_enabled",
"false")
.withNetworkAliases("elasticsearch")
.withPassword("elasticsearch")
+ .withStartupAttempts(5)
+ .withStartupTimeout(Duration.ofMinutes(5))
.withLogConsumer(new
Slf4jLogConsumer(DockerLoggerFactory.getLogger("elasticsearch:8.0.0")));
- container.start();
+ Startables.deepStart(Stream.of(container)).join();
Review Comment:
revert?
https://github.com/apache/incubator-seatunnel/pull/4068
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-hbase-e2e/src/test/resources/fake-to-hbase.conf:
##########
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+env {
+ execution.parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 5
+ schema {
+ fields {
+ name = string
+ age = int
Review Comment:
test all datatypes?
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-hbase-e2e/src/test/java/org/apache/seatunnel/e2e/connector/hbase/HbaseIT.java:
##########
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.e2e.connector.hbase;
+
+import org.apache.seatunnel.e2e.common.TestResource;
+import org.apache.seatunnel.e2e.common.TestSuiteBase;
+import org.apache.seatunnel.e2e.common.container.TestContainer;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
+import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
+import org.apache.hadoop.hbase.client.TableDescriptor;
+import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
+import org.apache.hadoop.hbase.io.compress.Compression;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.TestTemplate;
+import org.testcontainers.containers.Container;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.testcontainers.lifecycle.Startables;
+import org.testcontainers.utility.DockerImageName;
+import org.testcontainers.utility.DockerLoggerFactory;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.Objects;
+import java.util.stream.Stream;
+
+@Slf4j
+@Disabled("Hbase docker e2e case need user add mapping information of between
container id and ip address in hosts file")
+public class HbaseIT extends TestSuiteBase implements TestResource {
+
+ private static final String IMAGE = "harisekhon/hbase";
Review Comment:
add image version?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]