You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/06/10 14:23:10 UTC

[incubator-inlong] branch release-1.2.0 updated (75e87c18a -> 266ee0a4a)

This is an automated email from the ASF dual-hosted git repository.

healchow pushed a change to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


    from 75e87c18a [INLONG-4619][Sort] Fix maven package problem of Hive connector (#4620)
     new 1d70ad5a7 [INLONG-4594][Audit] Make Elasticsearch authentication configurable (#4595)
     new bc6c6765d [INLONG-4622][Manager] Append db name in JDBC URL for load node (#4623)
     new b4dd1ad47 [INLONG-4624][Sort] Package Pulsar and Hive connectors to the same file (#4625)
     new 266ee0a4a [INLONG-4626][Manager] Remove redundant connector sub directory (#4627)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../inlong/audit/config/ElasticsearchConfig.java   | 28 +++++++++++++++++-----
 inlong-audit/conf/application.properties           |  1 +
 .../src/main/assemblies/release.xml                |  6 ++---
 .../manager/plugin/flink/FlinkOperation.java       |  2 +-
 .../manager/service/sort/util/LoadNodeUtils.java   |  2 +-
 5 files changed, 28 insertions(+), 11 deletions(-)


[incubator-inlong] 01/04: [INLONG-4594][Audit] Make Elasticsearch authentication configurable (#4595)

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

healchow pushed a commit to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git

commit 1d70ad5a70e54fdcfa39123f5a38e1087e687a31
Author: xueyingzhang <86...@users.noreply.github.com>
AuthorDate: Fri Jun 10 19:59:05 2022 +0800

    [INLONG-4594][Audit] Make Elasticsearch authentication configurable (#4595)
---
 .../inlong/audit/config/ElasticsearchConfig.java   | 28 +++++++++++++++++-----
 inlong-audit/conf/application.properties           |  1 +
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/config/ElasticsearchConfig.java b/inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/config/ElasticsearchConfig.java
index 77e3a53a5..4c72c68cc 100644
--- a/inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/config/ElasticsearchConfig.java
+++ b/inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/config/ElasticsearchConfig.java
@@ -56,6 +56,9 @@ public class ElasticsearchConfig {
     @Value("${elasticsearch.connectionRequestTimeout:500}")
     private int connectionRequestTimeout;
 
+    @Value("${elasticsearch.authEnable:false}")
+    private boolean authEnable;
+
     @Value("${elasticsearch.username}")
     private String username;
 
@@ -83,14 +86,27 @@ public class ElasticsearchConfig {
     @Value("${elasticsearch.auditIdSet}")
     private String auditIdSet;
 
-    @Bean(destroyMethod = "close",name = "restClient")
+    @Bean(destroyMethod = "close", name = "restClient")
     public RestHighLevelClient initRestClient() {
 
-        final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
-        credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
-        RestClientBuilder restClientBuilder = RestClient.builder(new HttpHost(host, port, "http"))
-                .setHttpClientConfigCallback(httpAsyncClientBuilder ->
-                        httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
+        // support es cluster with multi hosts
+        List<HttpHost> hosts = new ArrayList<>();
+        String[] hostArrays = host.split(",");
+        for (String host : hostArrays) {
+            if (StringUtils.isNotEmpty(host)) {
+                hosts.add(new HttpHost(host.trim(), port, "http"));
+            }
+        }
+
+        RestClientBuilder restClientBuilder = RestClient.builder(hosts.toArray(new HttpHost[0]));
+
+        // configurable auth
+        if (authEnable) {
+            final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
+            credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
+            restClientBuilder.setHttpClientConfigCallback(httpAsyncClientBuilder ->
+                    httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
+        }
 
         restClientBuilder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder
                 .setConnectTimeout(connTimeout).setSocketTimeout(socketTimeout)
diff --git a/inlong-audit/conf/application.properties b/inlong-audit/conf/application.properties
index 03162bc81..c0b0374b1 100644
--- a/inlong-audit/conf/application.properties
+++ b/inlong-audit/conf/application.properties
@@ -66,6 +66,7 @@ audit.tube.consumer.group.name=inlong-audit-consumer
 # es config
 elasticsearch.host=127.0.0.1
 elasticsearch.port=9200
+elasticsearch.authEnable=false
 elasticsearch.username=elastic
 elasticsearch.password=inlong
 elasticsearch.shardsNum=5


[incubator-inlong] 02/04: [INLONG-4622][Manager] Append db name in JDBC URL for load node (#4623)

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

healchow pushed a commit to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git

commit bc6c6765d4861f4586db851ebffd0b9a41bc6652
Author: lucaspeng12138 <10...@users.noreply.github.com>
AuthorDate: Fri Jun 10 20:05:03 2022 +0800

    [INLONG-4622][Manager] Append db name in JDBC URL for load node (#4623)
---
 .../java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java
index 5cdcfba54..e6456b78a 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java
@@ -289,7 +289,7 @@ public class LoadNodeUtils {
                 1,
                 null,
                 ckSink.getTableName(),
-                ckSink.getJdbcUrl(),
+                ckSink.getJdbcUrl() + "/" + ckSink.getDbName(),
                 ckSink.getUsername(),
                 ckSink.getPassword()
         );


[incubator-inlong] 03/04: [INLONG-4624][Sort] Package Pulsar and Hive connectors to the same file (#4625)

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

healchow pushed a commit to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git

commit b4dd1ad47edf436ed280a142445bfe7e1e71056e
Author: ganfengtan <Ga...@users.noreply.github.com>
AuthorDate: Fri Jun 10 20:23:45 2022 +0800

    [INLONG-4624][Sort] Package Pulsar and Hive connectors to the same file (#4625)
---
 inlong-distribution/src/main/assemblies/release.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/inlong-distribution/src/main/assemblies/release.xml b/inlong-distribution/src/main/assemblies/release.xml
index 5e3658e86..6fd3cfa48 100644
--- a/inlong-distribution/src/main/assemblies/release.xml
+++ b/inlong-distribution/src/main/assemblies/release.xml
@@ -73,7 +73,7 @@
         <!--basic connector-->
         <fileSet>
             <directory>../inlong-sort/sort-connectors/pulsar/target</directory>
-            <outputDirectory>sort-plugin/connectors</outputDirectory>
+            <outputDirectory>sort-plugin</outputDirectory>
             <includes>
                 <include>sort-connector-pulsar-${project.version}.jar</include>
             </includes>
@@ -81,7 +81,7 @@
         </fileSet>
         <fileSet>
             <directory>../inlong-sort/sort-connectors/hive/target</directory>
-            <outputDirectory>sort-plugin/connectors</outputDirectory>
+            <outputDirectory>sort-plugin</outputDirectory>
             <includes>
                 <include>sort-connector-hive-${project.version}.jar</include>
             </includes>
@@ -142,4 +142,4 @@
         </fileSet>
     </fileSets>
 
-</assembly>
\ No newline at end of file
+</assembly>


[incubator-inlong] 04/04: [INLONG-4626][Manager] Remove redundant connector sub directory (#4627)

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

healchow pushed a commit to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git

commit 266ee0a4a595dbaaea847dadd6084ac65c9bf732
Author: woofyzhao <49...@qq.com>
AuthorDate: Fri Jun 10 22:06:12 2022 +0800

    [INLONG-4626][Manager] Remove redundant connector sub directory (#4627)
---
 .../java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java b/inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java
index 4fefc75a8..68cc07d6c 100644
--- a/inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java
+++ b/inlong-manager/manager-plugins/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkOperation.java
@@ -44,7 +44,7 @@ public class FlinkOperation {
     private static final String INLONG_MANAGER = "inlong-manager";
     private static final String INLONG_SORT = "inlong-sort";
     private static final String SORT_JAR_PATTERN = "^sort-dist.*jar$";
-    private static final String SORT_PLUGIN = "sort-plugin" + File.separator + "connectors";
+    private static final String SORT_PLUGIN = "sort-plugin";
 
     private final FlinkService flinkService;