forked from apache/eventmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE apache#5039]support full sync of mysql (apache#5038)
* use conf instead of resource * prepare for full and check * more and more * mysql type for read * mysql type for read * close to finish full read and begin full write * do full write * prepare for full write * close to finish full read and begin full write * close to finish full read and begin full write * close to finish full read and begin full write * fix commit execute * fix checkstyle and license * fix checkstyle and license * fix checkstyle and license
- Loading branch information
Showing
50 changed files
with
3,035 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
eventmesh-common/src/main/java/org/apache/eventmesh/common/AbstractComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* 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.eventmesh.common; | ||
|
||
import java.util.concurrent.atomic.AtomicBoolean; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public abstract class AbstractComponent implements ComponentLifeCycle { | ||
private final AtomicBoolean started = new AtomicBoolean(false); | ||
private final AtomicBoolean stopped = new AtomicBoolean(false); | ||
|
||
@Override | ||
public void start() throws Exception { | ||
if (!started.compareAndSet(false, true)) { | ||
log.info("component [{}] has started", this.getClass()); | ||
return; | ||
} | ||
log.info("component [{}] will start", this.getClass()); | ||
run(); | ||
log.info("component [{}] started successfully", this.getClass()); | ||
} | ||
|
||
@Override | ||
public void stop() throws Exception { | ||
if (!stopped.compareAndSet(false, true)) { | ||
log.info("component [{}] has stopped", this.getClass()); | ||
return; | ||
} | ||
log.info("component [{}] will stop", this.getClass()); | ||
shutdown(); | ||
log.info("component [{}] stopped successfully", this.getClass()); | ||
} | ||
|
||
protected abstract void run() throws Exception; | ||
|
||
protected abstract void shutdown() throws Exception; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...esh-common/src/main/java/org/apache/eventmesh/common/config/connector/rdb/JdbcConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.eventmesh.common.config.connector.rdb; | ||
|
||
import org.apache.eventmesh.common.config.connector.rdb.canal.RdbDBDefinition; | ||
|
||
import java.util.Set; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class JdbcConfig { | ||
private String url; | ||
|
||
private String dbAddress; | ||
|
||
private int dbPort; | ||
|
||
private String userName; | ||
|
||
private String passWord; | ||
|
||
private Set<RdbDBDefinition> databases; | ||
} |
Oops, something went wrong.