-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group MySQL and Postgres stream states
Signed-off-by: Hai Yan <[email protected]>
- Loading branch information
Showing
12 changed files
with
126 additions
and
54 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...va/org/opensearch/dataprepper/plugins/source/rds/coordination/state/MySqlStreamState.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,41 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.dataprepper.plugins.source.rds.coordination.state; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import org.opensearch.dataprepper.plugins.source.rds.model.BinlogCoordinate; | ||
import org.opensearch.dataprepper.plugins.source.rds.model.ForeignKeyRelation; | ||
|
||
import java.util.List; | ||
|
||
public class MySqlStreamState { | ||
|
||
@JsonProperty("currentPosition") | ||
private BinlogCoordinate currentPosition; | ||
|
||
@JsonProperty("foreignKeyRelations") | ||
private List<ForeignKeyRelation> foreignKeyRelations; | ||
|
||
public BinlogCoordinate getCurrentPosition() { | ||
return currentPosition; | ||
} | ||
|
||
public void setCurrentPosition(BinlogCoordinate currentPosition) { | ||
this.currentPosition = currentPosition; | ||
} | ||
|
||
public List<ForeignKeyRelation> getForeignKeyRelations() { | ||
return foreignKeyRelations; | ||
} | ||
|
||
public void setForeignKeyRelations(List<ForeignKeyRelation> foreignKeyRelations) { | ||
this.foreignKeyRelations = foreignKeyRelations; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...org/opensearch/dataprepper/plugins/source/rds/coordination/state/PostgresStreamState.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,37 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.dataprepper.plugins.source.rds.coordination.state; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class PostgresStreamState { | ||
|
||
@JsonProperty("currentLsn") | ||
private String currentLsn; | ||
|
||
@JsonProperty("replicationSlotName") | ||
private String replicationSlotName; | ||
|
||
public String getCurrentLsn() { | ||
return currentLsn; | ||
} | ||
|
||
public void setCurrentLsn(String currentLsn) { | ||
this.currentLsn = currentLsn; | ||
} | ||
|
||
public String getReplicationSlotName() { | ||
return replicationSlotName; | ||
} | ||
|
||
public void setReplicationSlotName(String replicationSlotName) { | ||
this.replicationSlotName = replicationSlotName; | ||
} | ||
} |
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
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