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

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

                Author: ASF GitHub Bot
            Created on: 15/Jun/20 18:00
            Start Date: 15/Jun/20 18:00
    Worklog Time Spent: 10m 
      Work Description: 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 a 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]


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

    Worklog Id:     (was: 445977)
    Time Spent: 1h  (was: 50m)

> Deprecate RedisIO.readAll() and add RedisIO.readKeyPatterns() as a replacement
> ------------------------------------------------------------------------------
>
>                 Key: BEAM-9747
>                 URL: https://issues.apache.org/jira/browse/BEAM-9747
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-redis
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: P3
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The current RedisIO.ReadAll transform does not follow the ReadAll pattern
> introduced by other IOs like HBaseIO, SolrIO and soon CassandraIO. We should
> change current ReadAll into ReadKeyPatterns to avoid confusion to be able to 
> provide a
> consistent ReadAll transform BEAM-9403



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to