From 5fbfd050619ae75f250337e6ac8c8fce1402e86f Mon Sep 17 00:00:00 2001 From: Tyrantlucifer Date: Wed, 28 Jun 2023 13:10:26 +0800 Subject: [PATCH] [Improve][Connector-V2][OSS-Jindo] Optimize jindo oss connector (#4964) * [Improve][Connector-V2][Jindo-Oss] Optimize jindo-oss connector * [Improve][Connector-V2][Jindo-Oss] Update module name * [Hotfix][Connector-V2][StarRocks] Fix code style --- .../pom.xml | 4 ++-- .../connectors/seatunnel/file/oss/config/OssConf.java | 2 ++ .../connectors/seatunnel/file/oss/config/OssConfig.java | 0 .../file/oss/exception/OssJindoConnectorException.java | 0 .../connectors/seatunnel/file/oss/sink/OssFileSink.java | 0 .../seatunnel/file/oss/sink/OssFileSinkFactory.java | 0 .../connectors/seatunnel/file/oss/source/OssFileSource.java | 0 .../seatunnel/file/oss/source/OssFileSourceFactory.java | 0 .../META-INF/services/org.apache.hadoop.fs.FileSystem | 0 .../apache/seatunnel/connectors/test/OssJindoFactoryTest.java | 0 seatunnel-connectors-v2/connector-file/pom.xml | 2 +- seatunnel-dist/pom.xml | 2 +- 12 files changed, 6 insertions(+), 4 deletions(-) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/pom.xml (95%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java (94%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConfig.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/exception/OssJindoConnectorException.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSinkFactory.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSource.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSourceFactory.java (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem (100%) rename seatunnel-connectors-v2/connector-file/{connector-file-oss-jindo => connector-file-jindo-oss}/src/test/java/org/apache/seatunnel/connectors/test/OssJindoFactoryTest.java (100%) diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/pom.xml b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/pom.xml similarity index 95% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/pom.xml rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/pom.xml index b20efc5b0ff..bf2b660bbc9 100644 --- a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/pom.xml +++ b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/pom.xml @@ -26,8 +26,8 @@ ${revision} - connector-file-oss-jindo - SeaTunnel : Connectors V2 : File : Oss Jindo + connector-file-jindo-oss + SeaTunnel : Connectors V2 : File : Jindo Oss 4.6.1 diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java similarity index 94% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java index 96c2f01dba2..968c3ebce4f 100644 --- a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java +++ b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConf.java @@ -49,6 +49,8 @@ public static HadoopConf buildWithConfig(Config config) { ossOptions.put("fs.oss.accessKeyId", config.getString(OssConfig.ACCESS_KEY.key())); ossOptions.put("fs.oss.accessKeySecret", config.getString(OssConfig.ACCESS_SECRET.key())); ossOptions.put("fs.oss.endpoint", config.getString(OssConfig.ENDPOINT.key())); + ossOptions.put("fs.oss.upload.thread.concurrency", "20"); + ossOptions.put("fs.oss.upload.queue.size", "100"); hadoopConf.setExtraOptions(ossOptions); return hadoopConf; } diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConfig.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConfig.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConfig.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/config/OssConfig.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/exception/OssJindoConnectorException.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/exception/OssJindoConnectorException.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/exception/OssJindoConnectorException.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/exception/OssJindoConnectorException.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSink.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSinkFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSinkFactory.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSinkFactory.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/sink/OssFileSinkFactory.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSource.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSource.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSource.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSource.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSourceFactory.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSourceFactory.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSourceFactory.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/oss/source/OssFileSourceFactory.java diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/main/resources/META-INF/services/org.apache.hadoop.fs.FileSystem diff --git a/seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/test/java/org/apache/seatunnel/connectors/test/OssJindoFactoryTest.java b/seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/test/java/org/apache/seatunnel/connectors/test/OssJindoFactoryTest.java similarity index 100% rename from seatunnel-connectors-v2/connector-file/connector-file-oss-jindo/src/test/java/org/apache/seatunnel/connectors/test/OssJindoFactoryTest.java rename to seatunnel-connectors-v2/connector-file/connector-file-jindo-oss/src/test/java/org/apache/seatunnel/connectors/test/OssJindoFactoryTest.java diff --git a/seatunnel-connectors-v2/connector-file/pom.xml b/seatunnel-connectors-v2/connector-file/pom.xml index 25e47c67c1e..d20e6296cbf 100644 --- a/seatunnel-connectors-v2/connector-file/pom.xml +++ b/seatunnel-connectors-v2/connector-file/pom.xml @@ -38,7 +38,7 @@ connector-file-base-hadoop connector-file-sftp connector-file-s3 - connector-file-oss-jindo + connector-file-jindo-oss diff --git a/seatunnel-dist/pom.xml b/seatunnel-dist/pom.xml index 51d4f4c48a9..fba4928996a 100644 --- a/seatunnel-dist/pom.xml +++ b/seatunnel-dist/pom.xml @@ -274,7 +274,7 @@ org.apache.seatunnel - connector-file-oss-jindo + connector-file-jindo-oss ${project.version} provided