Skip to content

Commit

Permalink
fix checkstyle error
Browse files Browse the repository at this point in the history
  • Loading branch information
xwm1992 committed Aug 1, 2024
1 parent edff946 commit 0e76cbb
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private SendExceptionContext buildSendExceptionContext(ConnectRecord record, Thr
SendExceptionContext sendExceptionContext = new SendExceptionContext();
sendExceptionContext.setMessageId(record.getRecordId());
sendExceptionContext.setCause(e);
if(org.apache.commons.lang3.StringUtils.isNotEmpty(record.getExtension("topic"))) {
if (org.apache.commons.lang3.StringUtils.isNotEmpty(record.getExtension("topic"))) {
sendExceptionContext.setTopic(record.getExtension("topic"));
}
return sendExceptionContext;
Expand All @@ -244,7 +244,7 @@ private SendExceptionContext buildSendExceptionContext(ConnectRecord record, Thr
private SendResult convertToSendResult(ConnectRecord record) {
SendResult result = new SendResult();
result.setMessageId(record.getRecordId());
if(org.apache.commons.lang3.StringUtils.isNotEmpty(record.getExtension("topic"))) {
if (org.apache.commons.lang3.StringUtils.isNotEmpty(record.getExtension("topic"))) {
result.setTopic(record.getExtension("topic"));
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public String name() {
return this.sinkConfig.getSinkConnectorConfig().getConnectorName();
}

@Override
public void onException(ConnectRecord record) {

}

@Override
public void stop() {
isRunning = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public String name() {
return this.sinkConfig.getSinkConnectorConfig().getConnectorName();
}

@Override
public void onException(ConnectRecord record) {

}

@Override
public void stop() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import org.apache.eventmesh.common.remote.offset.spring.SpringRecordPartition;
import org.apache.eventmesh.connector.spring.source.MessageSendingOperations;
import org.apache.eventmesh.openconnect.SourceWorker;
import org.apache.eventmesh.openconnect.offsetmgmt.api.callback.SendMessageCallback;
import org.apache.eventmesh.openconnect.api.connector.ConnectorContext;
import org.apache.eventmesh.openconnect.api.connector.SourceConnectorContext;
import org.apache.eventmesh.openconnect.api.source.Source;
import org.apache.eventmesh.openconnect.offsetmgmt.api.callback.SendMessageCallback;
import org.apache.eventmesh.openconnect.offsetmgmt.api.data.ConnectRecord;

import java.util.ArrayList;
Expand Down Expand Up @@ -128,6 +128,7 @@ public List<ConnectRecord> poll() {

/**
* Send message.
*
* @param message message to send
*/
@Override
Expand All @@ -141,9 +142,9 @@ public void send(Object message) {

/**
* Send message with a callback.
* @param message message to send.
* @param workerCallback After the user sends the message to the Connector,
* the SourceWorker will fetch message and invoke.
*
* @param message message to send.
* @param workerCallback After the user sends the message to the Connector, the SourceWorker will fetch message and invoke.
*/
@Override
public void send(Object message, SendMessageCallback workerCallback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public String name() {
return this.sinkConfig.getSinkConnectorConfig().getConnectorName();
}

@Override
public void onException(ConnectRecord record) {

}

@Override
public void stop() throws IOException {
isRunning = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public String name() {
return this.sinkConfig.getSinkConnectorConfig().getConnectorName();
}

@Override
public void onException(ConnectRecord record) {

}

@Override
public void stop() throws IOException {
isRunning = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
import org.apache.eventmesh.common.protocol.tcp.UserAgent;
import org.apache.eventmesh.common.utils.JsonUtils;
import org.apache.eventmesh.common.utils.SystemUtils;
import org.apache.eventmesh.openconnect.api.connector.SourceConnectorContext;
import org.apache.eventmesh.openconnect.api.source.Source;
import org.apache.eventmesh.openconnect.offsetmgmt.api.callback.SendExceptionContext;
import org.apache.eventmesh.openconnect.offsetmgmt.api.callback.SendMessageCallback;
import org.apache.eventmesh.openconnect.offsetmgmt.api.callback.SendResult;
import org.apache.eventmesh.openconnect.api.connector.SourceConnectorContext;
import org.apache.eventmesh.openconnect.api.source.Source;
import org.apache.eventmesh.openconnect.offsetmgmt.api.data.ConnectRecord;
import org.apache.eventmesh.openconnect.offsetmgmt.api.data.RecordOffsetManagement;
import org.apache.eventmesh.openconnect.offsetmgmt.api.storage.DefaultOffsetManagementServiceImpl;
Expand Down

0 comments on commit 0e76cbb

Please sign in to comment.