Skip to content
Merged
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 @@ -23,6 +23,7 @@
import javax.annotation.Nullable;
import org.apache.beam.sdk.schemas.AutoValueSchema;
import org.apache.beam.sdk.schemas.annotations.DefaultSchema;
import org.apache.beam.sdk.schemas.annotations.SchemaCreate;
import org.apache.beam.sdk.schemas.annotations.SchemaFieldName;
import org.apache.beam.sdk.schemas.annotations.SchemaIgnore;
import org.apache.kafka.common.TopicPartition;
Expand Down Expand Up @@ -72,4 +73,17 @@ public static KafkaSourceDescriptor of(
startReadTime,
bootstrapServers);
}

@SchemaCreate
@SuppressWarnings("all")
// TODO(BEAM-10677): Remove this function after AutoValueSchema is fixed.
static KafkaSourceDescriptor create(
String topic,
Integer partition,
Long start_read_offset,
Instant start_read_time,
List<String> bootstrap_servers) {
return new AutoValue_KafkaSourceDescriptor(
topic, partition, start_read_offset, start_read_time, bootstrap_servers);
}
}