aliehsaeedii commented on code in PR #21513:
URL: https://github.com/apache/kafka/pull/21513#discussion_r2832826075


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredSessionStoreWithHeaders.java:
##########
@@ -0,0 +1,318 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.streams.state.internals;
+
+import org.apache.kafka.common.header.internals.RecordHeaders;
+import org.apache.kafka.common.serialization.Deserializer;
+import org.apache.kafka.common.serialization.Serde;
+import org.apache.kafka.common.serialization.Serializer;
+import org.apache.kafka.common.utils.Bytes;
+import org.apache.kafka.common.utils.Time;
+import org.apache.kafka.streams.internals.ApiUtils;
+import org.apache.kafka.streams.kstream.Windowed;
+import org.apache.kafka.streams.kstream.internals.Change;
+import org.apache.kafka.streams.kstream.internals.WrappingNullableUtils;
+import org.apache.kafka.streams.processor.StateStore;
+import org.apache.kafka.streams.processor.StateStoreContext;
+import org.apache.kafka.streams.processor.internals.ProcessorContextUtils;
+import org.apache.kafka.streams.state.AggregationWithHeaders;
+import org.apache.kafka.streams.state.KeyValueIterator;
+import org.apache.kafka.streams.state.SessionStore;
+import org.apache.kafka.streams.state.SessionStoreWithHeaders;
+import org.apache.kafka.streams.state.StateSerdes;
+
+import java.time.Instant;
+
+import static 
org.apache.kafka.streams.internals.ApiUtils.prepareMillisCheckFailMsgPrefix;
+
+public class MeteredSessionStoreWithHeaders<K, AGG>
+    extends MeteredSessionStore<K, AggregationWithHeaders<AGG>>
+    implements SessionStoreWithHeaders<K, AGG> {
+
+    private final Serde<AGG> rawAggSerde;
+    private StateSerdes<K, AGG> serdes;
+    private AggregationWithHeadersSerializer<AGG> 
aggregationWithHeadersSerializer;
+    private AggregationWithHeadersDeserializer<AGG> 
aggregationWithHeadersDeserializer;
+
+    MeteredSessionStoreWithHeaders(final SessionStore<Bytes, byte[]> inner,
+                                   final String metricsScope,
+                                   final Serde<K> keySerde,
+                                   final Serde<AGG> aggSerde,
+                                   final Time time) {
+        super(inner, metricsScope, keySerde, 
createAggregationWithHeadersSerde(aggSerde), time);
+        this.rawAggSerde = aggSerde;
+    }

Review Comment:
   Wondering if it could be
   ```
   MeteredSessionStoreWithHeaders(final SessionStore<Bytes, byte[]> inner,
                                      final String metricsScope,
                                      final Serde<K> keySerde,
                                      final Serde<AggregationWithHeaders<AGG>> 
aggSerde,
                                      final Time time) {
           super(inner, metricsScope, keySerde, aggSerde, time);
           this.rawAggSerde = aggSerde;
       }



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to