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

[FSTORE-1023] Mix up of subjectId and schemaId #1122

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'master' into FSTORE-1023
  • Loading branch information
bubriks authored Jan 25, 2024
commit 4558e8cf51c6ac5d3eddef92abb80583d6175bfa
Original file line number Diff line number Diff line change
@@ -87,15 +87,15 @@ protected InputBatch<JavaRDD<GenericRecord>> fetchNewData(Option<String> lastChe
if (totalNewMsgs <= 0L) {
return new InputBatch(Option.empty(), KafkaOffsetGen.CheckpointUtils.offsetsToStr(offsetRanges));
} else {
JavaRDD<GenericRecord> newDataRdd = this.toRdd(offsetRanges, props.getString(HudiEngine.SCHEMA_ID));
JavaRDD<GenericRecord> newDataRdd = this.toRdd(offsetRanges);
return new InputBatch(Option.of(newDataRdd), KafkaOffsetGen.CheckpointUtils.offsetsToStr(offsetRanges));
}
}

private JavaRDD<GenericRecord> toRdd(OffsetRange[] offsetRanges, String schemaId) {
private JavaRDD<GenericRecord> toRdd(OffsetRange[] offsetRanges) {
return KafkaUtils.createRDD(this.sparkContext, this.offsetGen.getKafkaParams(), offsetRanges,
LocationStrategies.PreferConsistent())
.filter(obj -> schemaId.equals(getHeader(obj.headers(), "schemaId")))
.filter(obj -> obj.value() != null)
.map(obj -> (GenericRecord) obj.value());
}

You are viewing a condensed version of this merge commit. You can view the full changes here.