Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
3ce158ec
Commit
3ce158ec
authored
2 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Align Flink Kafka config with others
parent
95c5a28d
No related branches found
No related tags found
No related merge requests found
Pipeline
#10219
failed
2 years ago
Stage: build
Stage: test
Stage: check
Stage: deploy
Stage: smoketest
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/KafkaConnectorFactory.java
+12
-2
12 additions, 2 deletions
...olite/benchmarks/commons/flink/KafkaConnectorFactory.java
with
12 additions
and
2 deletions
theodolite-benchmarks/flink-commons/src/main/java/rocks/theodolite/benchmarks/commons/flink/KafkaConnectorFactory.java
+
12
−
2
View file @
3ce158ec
...
...
@@ -23,6 +23,8 @@ import rocks.theodolite.benchmarks.commons.flink.util.SerializableSupplier;
*/
public
class
KafkaConnectorFactory
{
private
static
final
String
AUTO_OFFSET_RESET_EARLIEST
=
"earliest"
;
private
static
final
Duration
PRODUCER_TRANSACTION_TIMEOUT
=
Duration
.
ofMinutes
(
5
);
private
final
Properties
kafkaProps
=
new
Properties
();
...
...
@@ -50,7 +52,7 @@ public class KafkaConnectorFactory {
public
<
T
>
FlinkKafkaConsumer
<
T
>
createConsumer
(
final
String
topic
,
final
DeserializationSchema
<
T
>
deserializationSchema
)
{
return
this
.
createBaseConsumer
(
new
FlinkKafkaConsumer
<>(
topic
,
deserializationSchema
,
this
.
clone
Properties
()));
new
FlinkKafkaConsumer
<>(
topic
,
deserializationSchema
,
this
.
buildConsumer
Properties
()));
}
/**
...
...
@@ -60,7 +62,7 @@ public class KafkaConnectorFactory {
public
<
T
>
FlinkKafkaConsumer
<
T
>
createConsumer
(
final
String
topic
,
final
KafkaDeserializationSchema
<
T
>
deserializationSchema
)
{
return
this
.
createBaseConsumer
(
new
FlinkKafkaConsumer
<>(
topic
,
deserializationSchema
,
this
.
clone
Properties
()));
new
FlinkKafkaConsumer
<>(
topic
,
deserializationSchema
,
this
.
buildConsumer
Properties
()));
}
/**
...
...
@@ -145,6 +147,14 @@ public class KafkaConnectorFactory {
return
producerProps
;
}
private
Properties
buildConsumerProperties
()
{
final
Properties
consumerProps
=
this
.
cloneProperties
();
consumerProps
.
setProperty
(
ConsumerConfig
.
AUTO_OFFSET_RESET_CONFIG
,
AUTO_OFFSET_RESET_EARLIEST
);
return
consumerProps
;
}
private
Properties
cloneProperties
()
{
final
Properties
props
=
new
Properties
();
props
.
putAll
(
this
.
kafkaProps
);
...
...
This diff is collapsed.
Click to expand it.
Sören Henning
@she
mentioned in issue
#407 (closed)
·
2 years ago
mentioned in issue
#407 (closed)
mentioned in issue #407
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment