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.
- Loading branch information
Showing
21 changed files
with
328 additions
and
239 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
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
21 changes: 21 additions & 0 deletions
21
...common/src/main/java/org/apache/eventmesh/common/remote/request/FetchPositionRequest.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,21 @@ | ||
package org.apache.eventmesh.common.remote.request; | ||
|
||
import org.apache.eventmesh.common.remote.job.DataSourceType; | ||
import org.apache.eventmesh.common.remote.offset.RecordPosition; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class FetchPositionRequest extends BaseGrpcRequest { | ||
|
||
private String jobID; | ||
|
||
private String address; | ||
|
||
private RecordPosition recordPosition; | ||
|
||
private DataSourceType dataSourceType; | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
...mmon/src/main/java/org/apache/eventmesh/common/remote/response/FetchPositionResponse.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,35 @@ | ||
package org.apache.eventmesh.common.remote.response; | ||
|
||
import org.apache.eventmesh.common.remote.JobState; | ||
import org.apache.eventmesh.common.remote.Position; | ||
import org.apache.eventmesh.common.remote.exception.ErrorCode; | ||
import org.apache.eventmesh.common.remote.job.JobTransportType; | ||
import org.apache.eventmesh.common.remote.offset.RecordPosition; | ||
|
||
import java.util.Map; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class FetchPositionResponse extends BaseGrpcResponse { | ||
|
||
private RecordPosition recordPosition; | ||
|
||
public static FetchPositionResponse successResponse() { | ||
FetchPositionResponse response = new FetchPositionResponse(); | ||
response.setSuccess(true); | ||
response.setErrorCode(ErrorCode.SUCCESS); | ||
return response; | ||
} | ||
|
||
public static FetchPositionResponse failResponse(int code, String desc) { | ||
FetchPositionResponse response = new FetchPositionResponse(); | ||
response.setSuccess(false); | ||
response.setErrorCode(code); | ||
response.setDesc(desc); | ||
return response; | ||
} | ||
|
||
} |
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
Oops, something went wrong.