Repository navigation
feat(dmap): add the distributed map operation #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,8 @@ | |
| CompletionItemStatus, | ||
| CompletionOutcome, | ||
| CompletionStatus, | ||
| DistributedMapItemStatus, | ||
| DistributedMapStatus, | ||
| ParallelBranch, | ||
| complete_batch, | ||
| continue_batch, | ||
|
|
@@ -27,6 +29,20 @@ | |
| durable_wait_for_callback, | ||
| durable_with_child_context, | ||
| ) | ||
| from aws_durable_execution_sdk_python.dmap.helpers import ( | ||
| DistributedMapProcessorEvent, | ||
| DistributedMapProcessorRecord, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The exported |
||
| DistributedMapReaderEvent, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The exported |
||
| ReaderPage, | ||
| process_distributed_map_batch, | ||
| process_distributed_map_items, | ||
| read_distributed_map_page, | ||
| ) | ||
| from aws_durable_execution_sdk_python.dmap.models import ( | ||
| DistributedMapResult, | ||
| DistributedMapResultItem, | ||
| DistributedMapSummary, | ||
| ) | ||
|
|
||
| # Most common exceptions - users need to handle these exceptions | ||
| from aws_durable_execution_sdk_python.exceptions import ( | ||
|
|
@@ -35,6 +51,7 @@ | |
| CallbackSubmitterError, | ||
| CallbackTimeoutError, | ||
| ChildContextError, | ||
| DistributedMapError, | ||
| DurableExecutionsError, | ||
| DurableOperationError, | ||
| ExecutionError, | ||
|
|
@@ -53,7 +70,12 @@ | |
| from aws_durable_execution_sdk_python.retries import WithRetryConfig, with_retry | ||
|
|
||
| # Essential context types - passed to user functions | ||
| from aws_durable_execution_sdk_python.types import StepContext | ||
| from aws_durable_execution_sdk_python.types import ( | ||
| DistributedMapBatchContext, | ||
| DistributedMapItemContext, | ||
| DistributedMapReaderContext, | ||
| StepContext, | ||
| ) | ||
|
|
||
|
|
||
| __all__ = [ | ||
|
|
@@ -69,6 +91,18 @@ | |
| "CompletionItemStatus", | ||
| "CompletionOutcome", | ||
| "CompletionStatus", | ||
| "DistributedMapBatchContext", | ||
| "DistributedMapError", | ||
| "DistributedMapItemContext", | ||
| "DistributedMapItemStatus", | ||
| "DistributedMapProcessorEvent", | ||
| "DistributedMapProcessorRecord", | ||
| "DistributedMapReaderContext", | ||
| "DistributedMapReaderEvent", | ||
| "DistributedMapResult", | ||
| "DistributedMapResultItem", | ||
| "DistributedMapStatus", | ||
| "DistributedMapSummary", | ||
| "DurableContext", | ||
| "DurableExecutionsError", | ||
| "DurableOperationError", | ||
|
|
@@ -77,6 +111,7 @@ | |
| "InvokeError", | ||
| "ParallelBranch", | ||
| "PluginLoadError", | ||
| "ReaderPage", | ||
| "RetryableSerDesError", | ||
| "SerDesError", | ||
| "StepContext", | ||
|
|
@@ -92,5 +127,8 @@ | |
| "durable_step", | ||
| "durable_wait_for_callback", | ||
| "durable_with_child_context", | ||
| "process_distributed_map_batch", | ||
| "process_distributed_map_items", | ||
| "read_distributed_map_page", | ||
| "with_retry", | ||
| ] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exported
DistributedMapProcessorEventis a parsed internal form, not the dictionary Lambda passes to the processor handler. Passing it toprocess_distributed_map_items()raisesAttributeError: 'DistributedMapProcessorEvent' object has no attribute 'get'. Can__init__.pystop exportingDistributedMapProcessorEvent?