aromanenko-dev commented on a change in pull request #11405:
URL: https://github.com/apache/beam/pull/11405#discussion_r440349717
##########
File path:
sdks/java/io/redis/src/main/java/org/apache/beam/sdk/io/redis/RedisIO.java
##########
@@ -123,8 +123,24 @@ public static Read read() {
* Like {@link #read()} but executes multiple instances of the Redis query
substituting each
* element of a {@link PCollection} as key pattern.
*/
- public static ReadAll readAll() {
- return new AutoValue_RedisIO_ReadAll.Builder()
+ public static ReadKeyPatterns readKeyPatterns() {
+ return new AutoValue_RedisIO_ReadKeyPatterns.Builder()
+ .setConnectionConfiguration(RedisConnectionConfiguration.create())
+ .setBatchSize(1000)
+ .setOutputParallelization(true)
+ .build();
+ }
+
+ /**
+ * Like {@link #read()} but executes multiple instances of the Redis query
substituting each
+ * element of a {@link PCollection} as key pattern.
+ *
+ * @deprecated This method is not consistent with the readAll pattern of
other transforms and will
+ * be remove soon. Please update you code to use {@link
#readKeyPatterns()} instead.
+ */
+ @Deprecated
+ public static ReadKeyPatterns readAll() {
Review comment:
There is API breakage here since some users could rely on the fact that
`readAll()` returns `ReadAll`. I think we should keep the same signature for
now but just deprecate it. Then remove it after 3 releases or change it to make
consistent with all other `ReadAll` patterns that take `PCollection<Read>` as
an input.
In the same time, we still can add new transform `ReadKeyPatterns`,
available through `readKeyPatterns()`, and ask users to use it instead.
----------------------------------------------------------------
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]