You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/11/03 16:07:04 UTC

[GitHub] [beam] lukecwik commented on pull request #15549: [BEAM-11997] Changed RedisIO implementation to SDF

lukecwik commented on pull request #15549:
URL: https://github.com/apache/beam/pull/15549#issuecomment-959576834


   Your loop `ProcessElement` loop would be like:
   ```
   byteKey = tracker.getRestriction().getStart();
   while (tryClaim(byteKey)) {
     cursor = convertToRedisCursor(byteKey);
     values, nextCursor = jedis.scan(cursor);
     byteKey = convertToByteKey(nextCursor);
     output values
   }
   return STOP;
   ```
   
   You could also create a `RedisCursorRangeTracker` that is a thin wrapper over the `ByteKeyRangeTracker` and effectively do conversions only by internalizing the `convertToRedisCursor` and `convertToByteKey` methods.


-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org