You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/18 08:44:52 UTC

[incubator-eventmesh] branch storage-api updated: [ISSUE #1391] connector-storage-jdbc SQL Interface

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

mikexue pushed a commit to branch storage-api
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/storage-api by this push:
     new 365cb602 [ISSUE #1391] connector-storage-jdbc SQL Interface
     new b7cc65bb Merge pull request #1642 from githublaohu/jdbc-connector-storage
365cb602 is described below

commit 365cb60283d632ffbfa3296f354f5727a2d3ca74
Author: githublaohu <23...@qq.com>
AuthorDate: Tue Oct 18 16:33:39 2022 +0800

    [ISSUE #1391] connector-storage-jdbc SQL Interface
---
 .../eventmesh-connector-storage-jdbc/build.gradle  | 49 ++++++++++++++++++++++
 .../gradle.properties                              | 18 ++++++++
 .../storage/jdbc/SQL/BaseSQLOperation.java         | 27 ++++++++++++
 settings.gradle                                    |  1 +
 4 files changed, 95 insertions(+)

diff --git a/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/build.gradle b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/build.gradle
new file mode 100644
index 00000000..d9286e85
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/build.gradle
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+
+configurations {
+    implementation.exclude group: 'ch.qos.logback', module: 'logback-classic'
+    implementation.exclude group: 'log4j', module: 'log4j'
+}
+
+
+
+dependencies {
+    implementation project(":eventmesh-common")
+    implementation project(":eventmesh-connector-plugin:eventmesh-connector-api")
+
+
+	implementation 'com.alibaba:druid:1.2.11'
+	implementation 'mysql:mysql-connector-java:8.0.30'
+	implementation 'org.yaml:snakeyaml:1.19'
+	
+	
+
+    testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api")
+    testImplementation project(":eventmesh-common")
+
+    testImplementation "org.mockito:mockito-core"
+    testImplementation "org.powermock:powermock-module-junit4"
+    testImplementation "org.powermock:powermock-api-mockito2"
+
+
+    compileOnly 'org.projectlombok:lombok:1.18.22'
+    annotationProcessor 'org.projectlombok:lombok:1.18.22'
+
+    testCompileOnly 'org.projectlombok:lombok:1.18.22'
+    testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
+}
diff --git a/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/gradle.properties b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/gradle.properties
new file mode 100644
index 00000000..688903ba
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/gradle.properties
@@ -0,0 +1,18 @@
+# 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.
+#
+
+pluginType=connector-storage
+pluginName=jdbc
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/main/java/org/apache/eventesh/connector/storage/jdbc/SQL/BaseSQLOperation.java b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/main/java/org/apache/eventesh/connector/storage/jdbc/SQL/BaseSQLOperation.java
new file mode 100644
index 00000000..66f0664b
--- /dev/null
+++ b/eventmesh-connector-plugin/eventmesh-connector-storage-jdbc/src/main/java/org/apache/eventesh/connector/storage/jdbc/SQL/BaseSQLOperation.java
@@ -0,0 +1,27 @@
+/*
+ * 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.eventesh.connector.storage.jdbc.SQL;
+
+public interface BaseSQLOperation {
+
+    public String createDatabases();
+
+    public String queryConsumerGroupTableSQL();
+
+    public String queryCloudEventTablesSQL();
+}
diff --git a/settings.gradle b/settings.gradle
index dca98b25..4b451cd8 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -29,6 +29,7 @@ include 'eventmesh-connector-plugin:eventmesh-connector-pravega'
 include 'eventmesh-connector-plugin:eventmesh-connector-rocketmq'
 include 'eventmesh-connector-plugin:eventmesh-connector-standalone'
 include 'eventmesh-connector-plugin:eventmesh-connector-pulsar'
+include 'eventmesh-connector-plugin:eventmesh-connector-storage-jdbc'
 include 'eventmesh-connector-plugin:eventmesh-connector-redis'
 include 'eventmesh-security-plugin:eventmesh-security-api'
 include 'eventmesh-security-plugin:eventmesh-security-acl'


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org