public class AggregatorUtil extends Object
Modifier and Type | Field and Description |
---|---|
static byte[] |
AGGREGATED_RECORD_MAGIC |
Constructor and Description |
---|
AggregatorUtil() |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
calculateTailCheck(byte[] data) |
KinesisClientRecord |
convertRecordToKinesisClientRecord(KinesisClientRecord record,
boolean aggregated,
long subSequenceNumber,
String explicitHashKey) |
List<KinesisClientRecord> |
deaggregate(List<KinesisClientRecord> records)
This method deaggregates the given list of Amazon Kinesis records into a
list of KPL user records.
|
List<KinesisClientRecord> |
deaggregate(List<KinesisClientRecord> records,
BigInteger startingHashKey,
BigInteger endingHashKey)
This method deaggregates the given list of Amazon Kinesis records into a
list of KPL user records.
|
List<KinesisClientRecord> |
deaggregate(List<KinesisClientRecord> records,
String startingHashKey,
String endingHashKey)
Deaggregate any KPL records found.
|
protected BigInteger |
effectiveHashKey(String partitionKey,
String explicitHashKey) |
public List<KinesisClientRecord> deaggregate(List<KinesisClientRecord> records)
records
- A list of Amazon Kinesis records, each possibly aggregated.public List<KinesisClientRecord> deaggregate(List<KinesisClientRecord> records, String startingHashKey, String endingHashKey)
BigInteger
s
before passing them on to deaggregate(List, BigInteger, BigInteger)
records
- the records to potentially deaggreatestartingHashKey
- the starting hash key of the shardendingHashKey
- the ending hash key of the shardpublic List<KinesisClientRecord> deaggregate(List<KinesisClientRecord> records, BigInteger startingHashKey, BigInteger endingHashKey)
records
- A list of Amazon Kinesis records, each possibly aggregated.startingHashKey
- A BigInteger representing the starting hash key that the
explicit hash keys or partition keys of retained resulting KPL
user records must be greater than or equal to.endingHashKey
- A BigInteger representing the ending hash key that the the
explicit hash keys or partition keys of retained resulting KPL
user records must be smaller than or equal to.protected byte[] calculateTailCheck(byte[] data)
protected BigInteger effectiveHashKey(String partitionKey, String explicitHashKey) throws UnsupportedEncodingException
UnsupportedEncodingException
public KinesisClientRecord convertRecordToKinesisClientRecord(@NonNull KinesisClientRecord record, boolean aggregated, long subSequenceNumber, String explicitHashKey)
Copyright © 2021. All rights reserved.