beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (BEAM-3446) RedisIO non-prefix read operations
Date Fri, 29 Jun 2018 14:23:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 29/Jun/18 14:22
            Start Date: 29/Jun/18 14:22
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #4656: [BEAM-3446] Fixes
RedisIO non-prefix read operations 
URL: https://github.com/apache/beam/pull/4656#discussion_r199170602
 
 

 ##########
 File path: sdks/java/io/redis/src/main/java/org/apache/beam/sdk/io/redis/RedisIO.java
 ##########
 @@ -260,16 +261,12 @@ public ReadAll withConnectionConfiguration(RedisConnectionConfiguration
connecti
 
   }
 
-  /**
-   * A {@link DoFn} requesting Redis server to get key/value pairs.
-   */
-  private static class ReadFn extends DoFn<String, KV<String, String>> {
-
-    private final RedisConnectionConfiguration connectionConfiguration;
+  private abstract static class BaseReadFn<T> extends DoFn<String, T> {
+    protected final RedisConnectionConfiguration connectionConfiguration;
 
-    private transient Jedis jedis;
+    protected transient Jedis jedis;
 
-    public ReadFn(RedisConnectionConfiguration connectionConfiguration) {
+    public BaseReadFn(RedisConnectionConfiguration connectionConfiguration) {
 
 Review comment:
   remove public, in general it is a common Beam practice to restrict access as much as possible.
 You can use IntelliJ's analyze code to do this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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

> RedisIO non-prefix read operations
> ----------------------------------
>
>                 Key: BEAM-3446
>                 URL: https://issues.apache.org/jira/browse/BEAM-3446
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-redis
>            Reporter: Vinay varma
>            Assignee: Vinay varma
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Read operation in RedisIO is for prefix based look ups. While this can be used for exact
key matches as well, the number of operations limits the through put of the function.
> I suggest exposing current readAll operation as readbyprefix and using more simpler operations
for readAll functionality.
> ex:
> {code:java}
> String output = jedis.get(element);
> if (output != null) {
>     processContext.output(KV.of(element, output));
> }
> {code}
> instead of:
> https://github.com/apache/beam/blob/7d240c0bb171af6868f1a6e95196c9dcfc9ac640/sdks/java/io/redis/src/main/java/org/apache/beam/sdk/io/redis/RedisIO.java#L292



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message