piotr-szuberski commented on a change in pull request #12297: URL: https://github.com/apache/beam/pull/12297#discussion_r474416306
########## File path: sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java ########## @@ -295,14 +300,16 @@ private static final int DEFAULT_NUM_RETRIES = 6; /** Returns a new {@link Read} transform for reading from Kinesis. */ - public static Read read() { - return new AutoValue_KinesisIO_Read.Builder() - .setMaxNumRecords(Long.MAX_VALUE) - .setUpToDateThreshold(Duration.ZERO) - .setWatermarkPolicyFactory(WatermarkPolicyFactory.withArrivalTimePolicy()) - .setRateLimitPolicyFactory(RateLimitPolicyFactory.withoutLimiter()) - .setMaxCapacityPerShard(ShardReadersPool.DEFAULT_CAPACITY_PER_SHARD) - .build(); + public static Read<KinesisRecord> read() { Review comment: The worst thing I can imagine is that a user will get a raw type warning if he used it like `KinesisIO.Read read = KinesisIO.read();`. Some users could have some checkers that would turn it into an error though. I don't know how much common such tools are in the Java development. ---------------------------------------------------------------- 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: us...@infra.apache.org