齿轮生成器
创建 RedisGears作管道以转换数据。
Redis 堆栈 |
---|
这GearsBuilder
class 允许您创建转换数据的 RedisGears 函数管道。
它需要一个读取器向管道提供数据。
要创建GearsBuilder
对象,请遵循以下示例代码:
BaseReader reader = ...; // Initialize the reader
builder = GearsBuilder.CreateGearsBuilder(reader);
Functions
Function
Description
accumulate
Reduces many records in the pipe to a single record.
accumulateBy
Groups records and reduces each group to a single record per group.
asyncFilter
Asynchronously filters out records in the pipe based on a given condition.
asyncForeach
For each record in the pipe, asynchronously runs some operations.
asyncMap
Asynchronously maps records one-to-one.
callNext
Calls the next execution that overrides the command or the original command itself. A more flexible version of callNextArray.
callNextArray
Calls the next execution that overrides the command or the original command itself.
collect
Collects all records to the origin shard.
configGet
Gets the value of a RedisGears configuration setting.
count
Counts the number of records in the pipe.
CreateGearsBuilder
Creates a new GearsBuilder object.
execute
Runs a Redis command. A more flexible version of executeArray.
executeArray
Runs a Redis command.
filter
Filters out records in the pipe based on a given condition.
flatMap
Maps a single input record to one or more output records.
foreach
For each record in the pipe, runs some operations.
hashtag
Returns a string that maps to the current shard.
localAccumulateBy
Groups records and reduces each group to a single record per group locally on each shard.
log
Writes a log message to the Redis log file.
map
Maps records one-to-one.
register
Registers the pipeline of functions to run when certain events occur.
repartition
Moves records between shards according to the extracted data.
run
Runs the pipeline of functions immediately.
On this page