Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/apache/eventmesh into fix…
Browse files Browse the repository at this point in the history
…-5040

� Conflicts:
�	eventmesh-connectors/eventmesh-connector-canal/src/main/java/org/apache/eventmesh/connector/canal/sink/connector/CanalSinkConnector.java
�	eventmesh-connectors/eventmesh-connector-canal/src/main/java/org/apache/eventmesh/connector/canal/source/EntryParser.java
  • Loading branch information
xwm1992 committed Jul 23, 2024
2 parents b392f2a + 3b770f8 commit c5c2c15
Show file tree
Hide file tree
Showing 86 changed files with 3,735 additions and 499 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ updates:
directory: "/"
open-pull-requests-limit: 15
schedule:
interval: "weekly"
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-major" ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
apache/eventmesh
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
65 changes: 54 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ buildscript {

dependencies {
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:5.2.5"
classpath "io.spring.gradle:dependency-management-plugin:1.1.5"
classpath "io.spring.gradle:dependency-management-plugin:1.1.6"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.13.0"

classpath "org.apache.httpcomponents:httpclient:4.5.14"
Expand Down Expand Up @@ -109,7 +109,7 @@ allprojects {
url "https://maven.aliyun.com/repository/public"
}
}
testImplementation "org.junit.jupiter:junit-jupiter:5.10.2"
testImplementation "org.junit.jupiter:junit-jupiter:5.10.3"
}

spotless {
Expand Down Expand Up @@ -210,6 +210,48 @@ tasks.register('dist') {
}
}

tasks.register('dist-admin') {
subprojects.forEach { subProject ->
dependsOn("${subProject.path}:jar")
}
def includedProjects =
[
"eventmesh-admin-server",
"eventmesh-common",
"eventmesh-spi",
"eventmesh-registry:eventmesh-registry-api",
"eventmesh-registry:eventmesh-registry-nacos",
"eventmesh-openconnect:eventmesh-openconnect-offsetmgmt-plugin:eventmesh-openconnect-offsetmgmt-api"
]
doLast {
includedProjects.each {
def subProject = findProject(it)
copy {
from subProject.jar.archivePath
into rootProject.file('dist/apps')
}
copy {
from subProject.configurations.runtimeClasspath
into rootProject.file('dist/lib')
exclude 'eventmesh-*'
}
copy {
from subProject.file('bin')
into rootProject.file('dist/bin')
}
copy {
from subProject.file('conf')
from subProject.sourceSets.main.resources.srcDirs
into rootProject.file('dist/conf')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude 'META-INF'
}

}
}

}

tasks.register('installPlugin') {
var pluginProjects = subprojects.findAll {
it.file('gradle.properties').exists()
Expand Down Expand Up @@ -654,9 +696,9 @@ subprojects {
sign publishing.publications.mavenJava
}

def grpcVersion = '1.64.0'
def grpcVersion = '1.65.1'
def log4jVersion = '2.23.1'
def jacksonVersion = '2.17.1'
def jacksonVersion = '2.17.2'
def dropwizardMetricsVersion = '4.2.26'
def opentelemetryVersion = '1.36.0'
def cloudeventsVersion = '3.0.0'
Expand Down Expand Up @@ -714,9 +756,9 @@ subprojects {
dependency "org.springframework.boot:spring-boot-starter-web:2.7.18"
dependency "io.openmessaging:registry-server:0.0.1"

dependency "org.junit.jupiter:junit-jupiter:5.10.2"
dependency "org.junit.jupiter:junit-jupiter:5.10.3"
dependency "org.junit-pioneer:junit-pioneer:1.9.1"
dependency "org.assertj:assertj-core:3.26.0"
dependency "org.assertj:assertj-core:3.26.3"

dependency "org.mockito:mockito-core:${mockitoVersion}"
dependency "org.mockito:mockito-inline:${mockitoVersion}"
Expand All @@ -739,26 +781,27 @@ subprojects {

dependency "org.javassist:javassist:3.30.2-GA"

dependency "com.alibaba.nacos:nacos-client:2.3.2"
dependency "com.alibaba.nacos:nacos-client:2.3.3"

dependency 'org.apache.zookeeper:zookeeper:3.9.2'
dependency "org.apache.curator:curator-client:${curatorVersion}"
dependency "org.apache.curator:curator-framework:${curatorVersion}"
dependency "org.apache.curator:curator-recipes:${curatorVersion}"
dependency "org.apache.curator:curator-test:${curatorVersion}"

dependency "org.projectlombok:lombok:1.18.32"
dependency "org.projectlombok:lombok:1.18.34"
dependency "javax.annotation:javax.annotation-api:1.3.2"
dependency "com.alibaba.fastjson2:fastjson2:2.0.51"
dependency "com.alibaba.fastjson2:fastjson2:2.0.52"

dependency "software.amazon.awssdk:s3:2.26.3"
dependency "com.github.rholder:guava-retrying:2.0.0"

dependency "org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.1"
dependency "com.alibaba:druid-spring-boot-starter:1.2.23"
dependency "com.baomidou:mybatis-plus-boot-starter:3.5.5"
dependency "org.springframework.boot:spring-boot-starter-jetty:2.7.18"
dependency "com.baomidou:mybatis-plus:3.5.6"
dependency "com.mysql:mysql-connector-j:8.4.0"
dependency "org.springframework.boot:spring-boot-starter-jetty:2.7.10"
dependency "org.locationtech.jts:jts-core:1.19.0"
}
}
}
23 changes: 15 additions & 8 deletions eventmesh-admin-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,25 @@ dependencies {
implementation "io.grpc:grpc-stub"
implementation "io.grpc:grpc-netty-shaded"

// https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter
implementation 'com.baomidou:mybatis-plus-boot-starter:3.5.7'
implementation "org.reflections:reflections:0.10.2"
// https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter
implementation "com.baomidou:mybatis-plus-boot-starter"

// https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter
implementation "com.alibaba:druid-spring-boot-starter"
compileOnly 'com.mysql:mysql-connector-j'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter
implementation "com.alibaba:druid-spring-boot-starter"
implementation 'com.mysql:mysql-connector-j'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}

configurations.implementation {
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}

sourceSets {
main {
resources {
srcDirs = ['src/main/resources', 'conf']
}
}
}

File renamed without changes.
108 changes: 108 additions & 0 deletions eventmesh-admin-server/conf/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?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.
-->

<Configuration status="debug" monitorInterval="60">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{1}(%F:%L) - %m%n"/>
</Console>
</Appenders>

<Loggers>
<AsyncRoot level="debug" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncRoot>

<AsyncLogger name="retry" level="info" additivity="false" includeLocation="true">
<AppenderRef ref="retryAppender"/>
</AsyncLogger>

<AsyncLogger name="httpMonitor" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="tcpMonitor" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="appMonitor" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="cmd" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="message" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="batchMessage" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="http" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="metaStorage" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="acl" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="org.apache.eventmesh.runtime" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="org.apache.rocketmq" level="INFO" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="RocketmqClient" level="INFO" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="RocketmqRemoting" level="INFO" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="RocketmqCommon" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="sessionLogger" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="subscribeLogger" level="info" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="com.alipay.sofa.jraft" level="info" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="io.grpc.netty" level="info" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.eventmesh.admin.server;

import org.apache.eventmesh.common.ComponentLifeCycle;
import org.apache.eventmesh.common.remote.Task;
import org.apache.eventmesh.common.remote.request.ReportHeartBeatRequest;
import org.apache.eventmesh.common.utils.PagedList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void start() {
}

@Override
public void destroy() {
public void stop() {
if (configuration.isEventMeshRegistryPluginEnabled()) {
registryService.unRegister(adminServeInfo);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@SpringBootApplication()
public class ExampleAdminServer {

public static void main(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.eventmesh.admin.server.web;

import org.apache.eventmesh.admin.server.ComponentLifeCycle;
import org.apache.eventmesh.common.ComponentLifeCycle;
import org.apache.eventmesh.common.remote.payload.PayloadFactory;

import javax.annotation.PostConstruct;
Expand All @@ -40,9 +40,9 @@ public void init() throws Exception {
}

@PreDestroy
public void shutdown() {
public void shutdown() throws Exception {
log.info("[{}] server will destroy", this.getClass().getSimpleName());
destroy();
stop();
log.info("[{}] server has be destroy", this.getClass().getSimpleName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void start() throws Exception {
}

@Override
public void destroy() {
public void stop() {
try {
if (server != null) {
server.shutdown();
Expand Down
3 changes: 2 additions & 1 deletion eventmesh-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

def grpcVersion = '1.64.0'
def grpcVersion = '1.65.1'

dependencies {
api "com.google.guava:guava"
Expand Down Expand Up @@ -48,6 +48,7 @@ dependencies {
implementation "org.apache.httpcomponents:httpclient"

implementation "io.netty:netty-all"
compileOnly 'com.mysql:mysql-connector-j'

implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
Expand Down
Loading

0 comments on commit c5c2c15

Please sign in to comment.