Skip to content

Commit

Permalink
Add --application-id parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Jan 26, 2024
1 parent 3d572de commit 615d351
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resources:
- repository: templates
type: github
name: bakdata/bakdata-project-templates
ref: tmp/upload-snapshot
endpoint: bot

jobs:
Expand Down
2 changes: 1 addition & 1 deletion charts/streams-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
value: "{{- range $key, $value := .Values.streams.extraInputPatterns }}{{ $key }}={{ $value }},{{- end }}"
{{- end }}
{{- if hasKey .Values.autoscaling "consumerGroup" }}
- name: "{{ .Values.configurationEnvPrefix }}_APPLICATION_ID"
- name: "{{ .Values.configurationEnvPrefix }}_UNIQUE_APP_ID"
value: {{ .Values.autoscaling.consumerGroup | quote }}
{{- end }}
{{- range $key, $value := .Values.secrets }}
Expand Down
2 changes: 1 addition & 1 deletion charts/streams-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ spec:
value: "{{- range $key, $value := .Values.streams.extraInputPatterns }}{{ $key }}={{ $value }},{{- end }}"
{{- end }}
{{- if hasKey .Values.autoscaling "consumerGroup" }}
- name: "{{ .Values.configurationEnvPrefix }}_APPLICATION_ID"
- name: "{{ .Values.configurationEnvPrefix }}_UNIQUE_APP_ID"
value: {{ .Values.autoscaling.consumerGroup | quote }}
{{- end }}
{{- range $key, $value := .Values.secrets }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public abstract class KafkaStreamsApplication extends KafkaApplication implement
@CommandLine.Option(names = "--volatile-group-instance-id", arity = "0..1",
description = "Whether the group instance id is volatile, i.e., it will change on a Streams shutdown.")
private boolean volatileGroupInstanceId;
@CommandLine.Option(names = "--application-id", description = "Application ID to use for Kafka Streams")
@CommandLine.Option(names = "--unique-app-id", description = "Application ID to use for Kafka Streams")
private String uniqueAppId;
private KafkaStreams streams;
private Throwable lastException;
Expand Down Expand Up @@ -278,7 +278,7 @@ private String getApplicationId() {
final String uniqueAppId = this.getUniqueAppId();
if (uniqueAppId == null) {
if (this.uniqueAppId == null) {
throw new IllegalArgumentException("Must pass --application-id or implement #getUniqueAppId()");
throw new IllegalArgumentException("Must pass --unique-app-id or implement #getUniqueAppId()");
}
return this.uniqueAppId;
}
Expand All @@ -287,7 +287,7 @@ private String getApplicationId() {
}
if (!uniqueAppId.equals(this.uniqueAppId)) {
throw new IllegalArgumentException(
"Application ID provided via --application-id does not match #getUniqueAppId()");
"Application ID provided via --unique-app-id does not match #getUniqueAppId()");
}
return uniqueAppId;
}
Expand Down

0 comments on commit 615d351

Please sign in to comment.