You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/05/31 04:00:17 UTC

[GitHub] [incubator-inlong] yunqingmoswu opened a new pull request, #4450: [INLONG-4448][Sort] Add Greenplum database data load support

yunqingmoswu opened a new pull request, #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450

   ### Title Name: [INLONG-4448][Sort] Add Greenplum database data load support
   
   Fixes #4448 
   
   ### Motivation
   
   I want to support data load to Greenplum database.
   
   ### Modifications
   
   It support data load to Greenplum database.
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [x] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] EMsnap merged pull request #4450: [INLONG-4448][Sort] Add Greenplum database data load support

Posted by GitBox <gi...@apache.org>.
EMsnap merged PR #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] yunqingmoswu commented on a diff in pull request #4450: [INLONG-4448][Sort] Add Greenplum database data load support

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450#discussion_r885366186


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/GreenplumLoadNode.java:
##########
@@ -0,0 +1,112 @@
+/*
+ *   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.inlong.sort.protocol.node.load;
+
+import com.google.common.base.Preconditions;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonTypeName;
+import org.apache.inlong.sort.protocol.FieldInfo;
+import org.apache.inlong.sort.protocol.constant.PostgresConstant;
+import org.apache.inlong.sort.protocol.enums.FilterStrategy;
+import org.apache.inlong.sort.protocol.node.LoadNode;
+import org.apache.inlong.sort.protocol.transformation.FieldRelation;
+import org.apache.inlong.sort.protocol.transformation.FilterFunction;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Greenplum load node can load data into Greenplum
+ */
+@EqualsAndHashCode(callSuper = true)
+@JsonTypeName("greenplumLoad")
+@Data
+@NoArgsConstructor
+public class GreenplumLoadNode extends LoadNode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * jdbc:postgresql://host:port/database

Review Comment:
   It's not wrong, because the Greenplum also uses "pg".



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] thexiay commented on a diff in pull request #4450: [INLONG-4448][Sort] Add Greenplum database data load support

Posted by GitBox <gi...@apache.org>.
thexiay commented on code in PR #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450#discussion_r885285535


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/table/JdbcDialects.java:
##########
@@ -54,13 +58,22 @@ public static Optional<JdbcDialect> get(String url) {
         return Optional.empty();
     }
 
+    public static Optional<JdbcDialect> getCustomDialect(String dialectImpl) {

Review Comment:
   is it better to put `getCustomDialect` wrapped in `get` func . Otherwise user sould know customDialect and normal dialect?



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] thexiay commented on a diff in pull request #4450: [INLONG-4448][Sort] Add Greenplum database data load support

Posted by GitBox <gi...@apache.org>.
thexiay commented on code in PR #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450#discussion_r885281501


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/GreenplumLoadNode.java:
##########
@@ -0,0 +1,112 @@
+/*
+ *   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.inlong.sort.protocol.node.load;
+
+import com.google.common.base.Preconditions;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonTypeName;
+import org.apache.inlong.sort.protocol.FieldInfo;
+import org.apache.inlong.sort.protocol.constant.PostgresConstant;
+import org.apache.inlong.sort.protocol.enums.FilterStrategy;
+import org.apache.inlong.sort.protocol.node.LoadNode;
+import org.apache.inlong.sort.protocol.transformation.FieldRelation;
+import org.apache.inlong.sort.protocol.transformation.FilterFunction;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Greenplum load node can load data into Greenplum
+ */
+@EqualsAndHashCode(callSuper = true)
+@JsonTypeName("greenplumLoad")
+@Data
+@NoArgsConstructor
+public class GreenplumLoadNode extends LoadNode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * jdbc:postgresql://host:port/database

Review Comment:
   "pg" change comment here



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-inlong] yunqingmoswu commented on a diff in pull request #4450: [INLONG-4448][Sort] Add Greenplum database data load support

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #4450:
URL: https://github.com/apache/incubator-inlong/pull/4450#discussion_r885293772


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/table/JdbcDialects.java:
##########
@@ -54,13 +58,22 @@ public static Optional<JdbcDialect> get(String url) {
         return Optional.empty();
     }
 
+    public static Optional<JdbcDialect> getCustomDialect(String dialectImpl) {

Review Comment:
   The user does not need to perceive the difference between the two, but if the user specifies a certain dialect, we must use this dialect, and this effect cannot be achieved only by get, because the url may be the same.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org