Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java CDK] : Remove isHeartbeatSupported() from target position inter… #35463

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ default boolean reachedTargetPosition(final T positionFromHeartbeat) {
throw new UnsupportedOperationException();
}

/**
* Indicates whether the implementation supports heartbeat position.
*
* @return true if heartbeats are supported
*/
default boolean isHeartbeatSupported() {
return false;
}

/**
* Returns a position value from a heartbeat event offset.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void close() throws Exception {
}

private boolean isHeartbeatEvent(final ChangeEvent<String, String> event) {
return targetPosition.isHeartbeatSupported() && Objects.nonNull(event) && !event.value().contains("source");
return Objects.nonNull(event) && !event.value().contains("source");
}

private boolean heartbeatPosNotChanging() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ java {
airbyteJavaConnector {
cdkVersionRequired = '0.20.6'
features = ['db-sources', 'datastore-postgres']
useLocalCdk = false
useLocalCdk = true
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ private PgLsn extractLsn(final JsonNode valueAsJson) {
.orElseThrow(() -> new IllegalStateException("Could not find LSN"));
}

@Override
public boolean isHeartbeatSupported() {
return true;
}

@Override
public Long extractPositionFromHeartbeatOffset(final Map<String, ?> sourceOffset) {
return (long) sourceOffset.get("lsn");
Expand Down
Loading