dannycranmer commented on a change in pull request #12881: URL: https://github.com/apache/flink/pull/12881#discussion_r468875478
########## File path: flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/publisher/RecordBatch.java ########## @@ -0,0 +1,83 @@ +/* + * 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.flink.streaming.connectors.kinesis.internals.publisher; + +import org.apache.flink.streaming.connectors.kinesis.model.StreamShardHandle; + +import com.amazonaws.services.kinesis.clientlibrary.types.UserRecord; +import com.amazonaws.services.kinesis.model.Record; + +import javax.annotation.Nullable; + +import java.math.BigInteger; +import java.util.List; + +/** + * A batch of UserRecords received from Kinesis. + * Input records are de-aggregated using KCL 1.x library. + * It is expected that AWS SDK v2.x messages are converted to KCL 1.x {@link UserRecord}. + */ +public class RecordBatch { + + private final int aggregatedRecordSize; + + private final List<UserRecord> deaggregatedRecords; + + private final long totalSizeInBytes; + + private final Long millisBehindLatest; + + public RecordBatch(final List<Record> records, final StreamShardHandle subscribedShard, final Long millisBehindLatest) { + this.aggregatedRecordSize = records.size(); Review comment: Done ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
