Skip to content

Commit 3842f9d

Browse files
Added Jobs to Trigger CRD's Status (#201)
Co-authored-by: Shrinand Thakkar <sthakkar@linkedin.com>
1 parent ac4bbb9 commit 3842f9d

5 files changed

Lines changed: 54 additions & 6 deletions

File tree

hoptimator-k8s/src/main/java/com/linkedin/hoptimator/k8s/models/V1alpha1TableTrigger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Trigger for a specific table.
3232
*/
3333
@ApiModel(description = "Trigger for a specific table.")
34-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-01-06T15:57:43.625Z[Etc/UTC]")
34+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-26T22:00:20.228Z[Etc/UTC]")
3535
public class V1alpha1TableTrigger implements io.kubernetes.client.common.KubernetesObject {
3636
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
3737
@SerializedName(SERIALIZED_NAME_API_VERSION)

hoptimator-k8s/src/main/java/com/linkedin/hoptimator/k8s/models/V1alpha1TableTriggerList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* TableTriggerList is a list of TableTrigger
3333
*/
3434
@ApiModel(description = "TableTriggerList is a list of TableTrigger")
35-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-01-06T15:57:43.625Z[Etc/UTC]")
35+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-26T22:00:20.228Z[Etc/UTC]")
3636
public class V1alpha1TableTriggerList implements io.kubernetes.client.common.KubernetesListObject {
3737
public static final String SERIALIZED_NAME_API_VERSION = "apiVersion";
3838
@SerializedName(SERIALIZED_NAME_API_VERSION)

hoptimator-k8s/src/main/java/com/linkedin/hoptimator/k8s/models/V1alpha1TableTriggerSpec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* TableTrigger spec.
3232
*/
3333
@ApiModel(description = "TableTrigger spec.")
34-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-01-06T15:57:43.625Z[Etc/UTC]")
34+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-26T22:00:20.228Z[Etc/UTC]")
3535
public class V1alpha1TableTriggerSpec {
3636
public static final String SERIALIZED_NAME_JOB_PROPERTIES = "jobProperties";
3737
@SerializedName(SERIALIZED_NAME_JOB_PROPERTIES)

hoptimator-k8s/src/main/java/com/linkedin/hoptimator/k8s/models/V1alpha1TableTriggerStatus.java

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@
2424
import io.swagger.annotations.ApiModelProperty;
2525
import java.io.IOException;
2626
import java.time.OffsetDateTime;
27+
import java.util.HashMap;
28+
import java.util.List;
29+
import java.util.Map;
2730

2831
/**
2932
* TableTrigger status.
3033
*/
3134
@ApiModel(description = "TableTrigger status.")
32-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-01-06T15:57:43.625Z[Etc/UTC]")
35+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-03-26T22:00:20.228Z[Etc/UTC]")
3336
public class V1alpha1TableTriggerStatus {
37+
public static final String SERIALIZED_NAME_JOBS = "jobs";
38+
@SerializedName(SERIALIZED_NAME_JOBS)
39+
private Map<String, Map<String, String>> jobs = null;
40+
3441
public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp";
3542
@SerializedName(SERIALIZED_NAME_TIMESTAMP)
3643
private OffsetDateTime timestamp;
@@ -40,6 +47,37 @@ public class V1alpha1TableTriggerStatus {
4047
private OffsetDateTime watermark;
4148

4249

50+
public V1alpha1TableTriggerStatus jobs(Map<String, Map<String, String>> jobs) {
51+
52+
this.jobs = jobs;
53+
return this;
54+
}
55+
56+
public V1alpha1TableTriggerStatus putJobsItem(String key, Map<String, String> jobsItem) {
57+
if (this.jobs == null) {
58+
this.jobs = new HashMap<>();
59+
}
60+
this.jobs.put(key, jobsItem);
61+
return this;
62+
}
63+
64+
/**
65+
* State of jobs triggered by this trigger.
66+
* @return jobs
67+
**/
68+
@javax.annotation.Nullable
69+
@ApiModelProperty(value = "State of jobs triggered by this trigger.")
70+
71+
public Map<String, Map<String, String>> getJobs() {
72+
return jobs;
73+
}
74+
75+
76+
public void setJobs(Map<String, Map<String, String>> jobs) {
77+
this.jobs = jobs;
78+
}
79+
80+
4381
public V1alpha1TableTriggerStatus timestamp(OffsetDateTime timestamp) {
4482

4583
this.timestamp = timestamp;
@@ -95,20 +133,22 @@ public boolean equals(Object o) {
95133
return false;
96134
}
97135
V1alpha1TableTriggerStatus v1alpha1TableTriggerStatus = (V1alpha1TableTriggerStatus) o;
98-
return Objects.equals(this.timestamp, v1alpha1TableTriggerStatus.timestamp) &&
136+
return Objects.equals(this.jobs, v1alpha1TableTriggerStatus.jobs) &&
137+
Objects.equals(this.timestamp, v1alpha1TableTriggerStatus.timestamp) &&
99138
Objects.equals(this.watermark, v1alpha1TableTriggerStatus.watermark);
100139
}
101140

102141
@Override
103142
public int hashCode() {
104-
return Objects.hash(timestamp, watermark);
143+
return Objects.hash(jobs, timestamp, watermark);
105144
}
106145

107146

108147
@Override
109148
public String toString() {
110149
StringBuilder sb = new StringBuilder();
111150
sb.append("class V1alpha1TableTriggerStatus {\n");
151+
sb.append(" jobs: ").append(toIndentedString(jobs)).append("\n");
112152
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
113153
sb.append(" watermark: ").append(toIndentedString(watermark)).append("\n");
114154
sb.append("}");

hoptimator-k8s/src/main/resources/tabletriggers.crd.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ spec:
6565
description: Timestamp of the last successfully processed trigger event.
6666
type: string
6767
format: date-time
68+
jobs:
69+
description: State of jobs triggered by this trigger.
70+
type: object
71+
additionalProperties:
72+
type: object
73+
description: Properties of the job.
74+
additionalProperties:
75+
type: string
6876
subresources:
6977
status: {}
7078
additionalPrinterColumns:

0 commit comments

Comments
 (0)