Skip to content

Commit

Permalink
[jcustenborder#111] Support latest kafka (3.7.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusLinkeHermes committed Jul 30, 2024
1 parent 1bde822 commit 90b7536
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,15 @@
<version>0.9.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.jcustenborder.kafka.connect</groupId>
<artifactId>connect-utils</artifactId>
<version>0.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.jcustenborder.kafka.connect</groupId>
<artifactId>connect-utils-testing-data</artifactId>
<version>${connect-utils.version}</version>
<version>0.7-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
public class AdjustPrecisionAndScale<R extends ConnectRecord<R>> extends BaseKeyValueTransformation<R> {
private static final Logger log = LoggerFactory.getLogger(AdjustPrecisionAndScale.class);

public AdjustPrecisionAndScale(boolean isKey) {
super(isKey);
public AdjustPrecisionAndScale() {
super();
}

protected boolean isKey = true;

@Override
public ConfigDef config() {
return AdjustPrecisionAndScaleConfig.config();
Expand Down Expand Up @@ -210,13 +212,15 @@ public void configure(Map<String, ?> settings) {

public static class Key<R extends ConnectRecord<R>> extends AdjustPrecisionAndScale<R> {
public Key() {
super(true);
super();
}
protected boolean isKey = true;
}

public static class Value<R extends ConnectRecord<R>> extends AdjustPrecisionAndScale<R> {
public Value() {
super(false);
super();
}
protected boolean isKey = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ public class HeaderToField<R extends ConnectRecord<R>> extends BaseKeyValueTrans

HeaderToFieldConfig config;

protected HeaderToField(boolean isKey) {
super(isKey);
protected HeaderToField() {
super();
}

protected boolean isKey = true;

@Override
public ConfigDef config() {
return HeaderToFieldConfig.config();
Expand Down Expand Up @@ -119,13 +121,17 @@ public void configure(Map<String, ?> map) {

public static class Key<R extends ConnectRecord<R>> extends HeaderToField<R> {
public Key() {
super(true);
super();
}

protected boolean isKey = true;
}

public static class Value<R extends ConnectRecord<R>> extends HeaderToField<R> {
public Value() {
super(false);
super();
}

protected boolean isKey = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
public class SetMaximumPrecision<R extends ConnectRecord<R>> extends BaseKeyValueTransformation<R> {
private static final Logger log = LoggerFactory.getLogger(SetMaximumPrecision.class);

public SetMaximumPrecision(boolean isKey) {
super(isKey);
public SetMaximumPrecision() {
super();
}

@Override
Expand Down Expand Up @@ -161,13 +161,17 @@ public void configure(Map<String, ?> settings) {

public static class Key<R extends ConnectRecord<R>> extends SetMaximumPrecision<R> {
public Key() {
super(true);
super();
}

protected boolean isKey = true;
}

public static class Value<R extends ConnectRecord<R>> extends SetMaximumPrecision<R> {
public Value() {
super(false);
super();
}

protected boolean isKey = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,24 @@ public abstract class TimestampNowField<R extends ConnectRecord<R>> extends Base
private TimestampNowFieldConfig config;
Time time = Time.SYSTEM;

protected TimestampNowField(boolean isKey) {
super(isKey);
protected TimestampNowField() {
super();
}

public static class Key<R extends ConnectRecord<R>> extends TimestampNowField<R> {
public Key() {
super(true);
super();
}

protected boolean isKey = true;
}

public static class Value<R extends ConnectRecord<R>> extends TimestampNowField<R> {
public Value() {
super(false);
super();
}

protected boolean isKey = false;
}

@Override
Expand Down

0 comments on commit 90b7536

Please sign in to comment.