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

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

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


##########
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:
   Then it would be better to extract as a constant with a proper javadoc.





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

    Worklog Id:     (was: 754181)
    Time Spent: 3h  (was: 2h 50m)

> 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: 3h
>  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