Skip to content

Commit

Permalink
build: Arroyo 2.14.0 (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnagara authored Jun 27, 2023
1 parent 2be8944 commit 05fa5d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ python-dateutil==2.8.2
python-rapidjson==1.8
pytz==2022.2.1
redis==4.3.4
sentry-arroyo==2.13.0
sentry-arroyo==2.14.0
sentry-kafka-schemas==0.1.14
sentry-redis-tools==0.1.6
sentry-relay==0.8.21
Expand Down
10 changes: 5 additions & 5 deletions snuba/consumers/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
from arroyo.processing.strategies import (
CommitOffsets,
FilterStep,
ParallelTransformStep,
ProcessingStrategy,
ProcessingStrategyFactory,
Reduce,
RunTask,
RunTaskInThreads,
TransformStep,
RunTaskWithMultiprocessing,
)
from arroyo.types import (
BaseValue,
Expand Down Expand Up @@ -835,11 +835,11 @@ def flush_batch(
]

if self.__processes is None:
inner_strategy = TransformStep(transform_function, collect)
inner_strategy = RunTask(transform_function, collect)
else:
assert self.__input_block_size is not None
assert self.__output_block_size is not None
inner_strategy = ParallelTransformStep(
inner_strategy = RunTaskWithMultiprocessing(
transform_function,
collect,
self.__processes,
Expand All @@ -850,7 +850,7 @@ def flush_batch(
initializer=self.__initialize_parallel_transform,
)

return TransformStep(
return RunTask(
partial(find_destination_storages, self.__storages),
FilterStep(
has_destination_storages,
Expand Down
7 changes: 4 additions & 3 deletions snuba/consumers/strategy_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
ProcessingStrategy,
ProcessingStrategyFactory,
Reduce,
RunTask,
RunTaskInThreads,
RunTaskWithMultiprocessing,
)
from arroyo.processing.strategies.commit import CommitOffsets
from arroyo.processing.strategies.transform import ParallelTransformStep, TransformStep
from arroyo.types import BaseValue, Commit, FilteredPayload, Message, Partition

from snuba.consumers.consumer import BytesInsertBatch, ProcessedMessageBatchWriter
Expand Down Expand Up @@ -136,11 +137,11 @@ def flush_batch(

strategy: ProcessingStrategy[Union[FilteredPayload, KafkaPayload]]
if self.__processes is None:
strategy = TransformStep(transform_function, collect)
strategy = RunTask(transform_function, collect)
else:
assert self.__input_block_size is not None
assert self.__output_block_size is not None
strategy = ParallelTransformStep(
strategy = RunTaskWithMultiprocessing(
transform_function,
collect,
self.__processes,
Expand Down

0 comments on commit 05fa5d5

Please sign in to comment.