From c4103d934a1ba02815a033a7d3a819086ca67326 Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Mon, 23 Dec 2024 06:25:08 -0500 Subject: [PATCH] Switch to (temporary) use of 'Date' type where possible --- .../solr/client/api/model/CollectionStatusResponse.java | 8 +++++++- .../solr/client/api/model/GetSegmentDataResponse.java | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/solr/api/src/java/org/apache/solr/client/api/model/CollectionStatusResponse.java b/solr/api/src/java/org/apache/solr/client/api/model/CollectionStatusResponse.java index ecf8167bd51..82109edb915 100644 --- a/solr/api/src/java/org/apache/solr/client/api/model/CollectionStatusResponse.java +++ b/solr/api/src/java/org/apache/solr/client/api/model/CollectionStatusResponse.java @@ -18,7 +18,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,8 +35,12 @@ public class CollectionStatusResponse extends SolrJerseyResponse { @JsonProperty public String name; @JsonProperty public Integer znodeVersion; + // TODO - consider 'Instant' once SOLR-17608 is finished - @JsonProperty public Long creationTimeMillis; + @JsonProperty + @JsonFormat(shape = JsonFormat.Shape.NUMBER) + public Date creationTimeMillis; + @JsonProperty public CollectionMetadata properties; @JsonProperty public Integer activeShards; @JsonProperty public Integer inactiveShards; diff --git a/solr/api/src/java/org/apache/solr/client/api/model/GetSegmentDataResponse.java b/solr/api/src/java/org/apache/solr/client/api/model/GetSegmentDataResponse.java index 2c27759a857..b5e3714bfd3 100644 --- a/solr/api/src/java/org/apache/solr/client/api/model/GetSegmentDataResponse.java +++ b/solr/api/src/java/org/apache/solr/client/api/model/GetSegmentDataResponse.java @@ -108,8 +108,11 @@ public static class SegmentDiagnosticInfo { public String luceneVersion; @JsonProperty public String source; + // TODO - consider 'Instant' once SOLR-17608 is finished - @JsonProperty public Long timestamp; + @JsonProperty + @JsonFormat(shape = JsonFormat.Shape.NUMBER) + public Date timestamp; @JsonProperty("java.runtime.version") public String javaRuntimeVersion;