You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/08/31 14:34:55 UTC

[GitHub] [incubator-seatunnel] Saintyang opened a new pull request, #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Saintyang opened a new pull request, #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584

   
   ## Purpose of this pull request
   
   Add sentry sink connector
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960491743


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   > maybe i should remove the example code?
   
   it's OK to me.
   I'm not sure if it's appropriate for the sink to write directly to SeatunelRow, if it is, it's OK



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1233664055

   ![snapshot](https://user-images.githubusercontent.com/25000682/187819854-a687d8ae-8914-4276-b30f-43888ab09770.png)
   @CalvinKirs  maybe you want this? this is the result of running SeaTunnelSentryExample.main()


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1236608257

   Can you add connector-v2 e2e-testcase & update docs
   
   reference:
   e2e: https://github.com/apache/incubator-seatunnel/pull/2499
   docs : https://github.com/apache/incubator-seatunnel/pull/2625


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960494871


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   Is there any other better format?



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960491743


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   > maybe i should remove the example code?
   
   it's OK to me.
   BTW, I'm not sure if it's appropriate for the sink to write directly to SeatunelRow.



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r961259710


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   Ok,



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960131467


##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.sentry</groupId>
+            <artifactId>sentry-logback</artifactId>
+            <version>5.0.1</version>

Review Comment:
   We manage dependencies uniformly in the root pom (dependency managernt)



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960131180


##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.sentry</groupId>
+            <artifactId>sentry-logback</artifactId>
+            <version>5.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>connector-common</artifactId>
+            <version>2.1.3-SNAPSHOT</version>
+            <scope>compile</scope>

Review Comment:
   ```suggestion
               <version>${project.version}</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: commits-unsubscribe@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960541527


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   I'm not sure, since it's a logging system. Maybe that's enough



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1236750376

   > Can you add connector-v2 e2e-testcase & update docs
   > 
   > reference: e2e: #2499 docs : #2625
   
   I think `Sentry Sink` can not run e2e. 


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960130969


##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+

Review Comment:
   hi, could you delete this?



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1237698755

   Document is ok.


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960174294


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   Test all datatypes?



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960524615


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   look at the screenshot. MESSAGE is what we write to Sentry.
   about  better format, for example? Do you mean we need a new class to reorginaze the info in SeaTunnelRow?



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1237601109

   > Can you add connector-v2 e2e-testcase & update docs
   > 
   > reference: e2e: #2499 docs : #2625
   finish updating doc.
   ad for e2e-test ,I agree with @EricJoy2048 , sentry need user acoount to create config to run the test
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r961258225


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   I think it's ok in current stage



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960174075


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   You can merged dev branch?  FeakSource updated schema format
   
   #2406



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#issuecomment-1233605669

   Hi, great, could you add some pictures of the corresponding test results? I don't have the corresponding environment


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960165995


##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+

Review Comment:
   done



##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.sentry</groupId>
+            <artifactId>sentry-logback</artifactId>
+            <version>5.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>connector-common</artifactId>
+            <version>2.1.3-SNAPSHOT</version>
+            <scope>compile</scope>

Review Comment:
   done



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960166311


##########
seatunnel-connectors-v2/connector-sentry/pom.xml:
##########
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>seatunnel-connectors-v2</artifactId>
+        <groupId>org.apache.seatunnel</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>connector-sentry</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.seatunnel</groupId>
+            <artifactId>seatunnel-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.commons</groupId>-->
+<!--            <artifactId>commons-lang3</artifactId>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.sentry</groupId>
+            <artifactId>sentry-logback</artifactId>
+            <version>5.0.1</version>

Review Comment:
   done



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960480493


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   maybe i should remove the example code? i didn't see other connector commit the example code



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r960493508


##########
seatunnel-connectors-v2/connector-sentry/src/main/java/org/apache/seatunnel/connectors/seatunnel/sentry/sink/SentrySinkWriter.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * 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.connectors.seatunnel.sentry.sink;
+
+import org.apache.seatunnel.api.sink.SinkWriter;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import io.sentry.Sentry;
+import io.sentry.SentryOptions;
+
+import java.io.IOException;
+
+/**
+ * @description: SentrySinkWriter class
+ */
+
+public class SentrySinkWriter extends AbstractSinkWriter<SeaTunnelRow, SentrySinkState> {
+    private SeaTunnelRowType seaTunnelRowType;
+    public SentrySinkWriter(SeaTunnelRowType seaTunnelRowType,
+                            SinkWriter.Context context,
+                            Config pluginConfig) {
+        SentryOptions options = new SentryOptions();
+        options.setDsn(pluginConfig.getString(SentryConfig.DSN));
+        if (pluginConfig.hasPath(SentryConfig.ENV)){
+            options.setEnvironment(pluginConfig.getString(SentryConfig.ENV));
+        }
+        if (pluginConfig.hasPath(SentryConfig.RELEASE)){
+            options.setRelease(pluginConfig.getString(SentryConfig.RELEASE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.CACHE_DIRPATH)){
+            options.setCacheDirPath(pluginConfig.getString(SentryConfig.CACHE_DIRPATH));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_CACHEITEMS)){
+            options.setMaxCacheItems(pluginConfig.getInt(SentryConfig.MAX_CACHEITEMS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.MAX_QUEUESIZE)){
+            options.setMaxQueueSize(pluginConfig.getInt(SentryConfig.MAX_QUEUESIZE));
+        }
+        if (pluginConfig.hasPath(SentryConfig.FLUSH_TIMEOUTMILLIS)){
+            options.setFlushTimeoutMillis(pluginConfig.getLong(SentryConfig.FLUSH_TIMEOUTMILLIS));
+        }
+        if (pluginConfig.hasPath(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION)){
+            options.setEnableExternalConfiguration(pluginConfig.getBoolean(SentryConfig.ENABLE_EXTERNAL_CONFIGURATION));
+        }
+        Sentry.init(options);
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Sentry.captureMessage(element.toString());

Review Comment:
   To be confirmed. used SeaTunnelRow it's ok?



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Saintyang commented on a diff in pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Saintyang commented on code in PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584#discussion_r961257499


##########
seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_sentry.conf:
##########
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+######
+###### This config file is a demonstration of streaming processing in seatunnel config
+######
+
+env {
+  # You can set flink configuration here
+  execution.parallelism = 1
+  #job.mode = "BATCH"
+  #execution.checkpoint.interval = 10000
+  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
+}
+
+source {
+  # This is a example source plugin **only for test and demonstrate the feature source plugin**
+    FakeSource {
+      result_table_name = "fake"
+      field_name = "name,age"

Review Comment:
   ok,i've remove the example class and conf file and pom dependency.  



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #2584: [Feature][Connector-V2] Add sentry sink connector #2244

Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #2584:
URL: https://github.com/apache/incubator-seatunnel/pull/2584


-- 
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@seatunnel.apache.org

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