Package org.apache.beam.sdk.io.redis
Class RedisIO.WriteStreams
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<KV<String,Map<String,String>>>,PDone>
org.apache.beam.sdk.io.redis.RedisIO.WriteStreams
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
RedisIO
public abstract static class RedisIO.WriteStreams
extends PTransform<PCollection<KV<String,Map<String,String>>>,PDone>
A
PTransform to write stream key pairs (https://redis.io/topics/streams-intro) to a
Redis server.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransformshould be expanded on the givenInputT.withApproximateTrim(boolean approximateTrim) IfwithMaxLen(long)is used, set the "~" prefix to the MAXLEN value, indicating to the server that it should use "close enough" trimming.Use the redis AUTH command when connecting to the server; the format of the string can be either just a password or a username and password separated by a space.Predefine aRedisConnectionConfigurationand pass it to the builder.withEndpoint(String host, int port) Set the hostname and port of the Redis server to connect to.withMaxLen(long maxLen) When appending (XADD) to a stream, set a MAXLEN option.withTimeout(int timeout) Set the connection timeout for the Redis server connection.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
WriteStreams
public WriteStreams()
-
-
Method Details
-
withEndpoint
Set the hostname and port of the Redis server to connect to. -
withAuth
Use the redis AUTH command when connecting to the server; the format of the string can be either just a password or a username and password separated by a space. See https://redis.io/commands/auth for details -
withTimeout
Set the connection timeout for the Redis server connection. -
withConnectionConfiguration
Predefine aRedisConnectionConfigurationand pass it to the builder. -
withMaxLen
When appending (XADD) to a stream, set a MAXLEN option. -
withApproximateTrim
IfwithMaxLen(long)is used, set the "~" prefix to the MAXLEN value, indicating to the server that it should use "close enough" trimming. -
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PCollection<KV<String,Map<String, String>>>, PDone>
-