[ 
https://issues.apache.org/jira/browse/BEAM-14104?focusedWorklogId=754222&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-754222
 ]

ASF GitHub Bot logged work on BEAM-14104:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/22 16:28
            Start Date: 07/Apr/22 16:28
    Worklog Time Spent: 10m 
      Work Description: mosche commented on code in PR #17113:
URL: https://github.com/apache/beam/pull/17113#discussion_r845347581


##########
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisPartitioner.java:
##########
@@ -47,6 +47,26 @@
     return null;
   }
 
+  /**
+   * An explicit partitioner that always returns a {@code Nonnull} explicit 
hash key. The partition
+   * key is irrelevant in this case, though it cannot be {@code null}.
+   */
+  interface ExplicitPartitioner<T> extends KinesisPartitioner<T> {
+    @Override
+    default @Nonnull String getPartitionKey(T record) {
+      return "a"; // will be ignored, but can't be null

Review Comment:
   This value is really totally irrelevant and has no meaning (as long as it 
doesn't fail validation checks), imho extracting it into a constant just 
overloads it with meaning it doesn't have... 





Issue Time Tracking
-------------------

    Worklog Id:     (was: 754222)
    Time Spent: 3.5h  (was: 3h 20m)

> Shard aware Kinesis record aggregation (AWS Sdk v2)
> ---------------------------------------------------
>
>                 Key: BEAM-14104
>                 URL: https://issues.apache.org/jira/browse/BEAM-14104
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws
>            Reporter: Moritz Mack
>            Assignee: Moritz Mack
>            Priority: P2
>              Labels: aws-sdk-v2, kinesis
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Implement advanced Kinesis record aggregation that is aware of active shards 
> in the stream for optimal record aggregation.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to