opensearch-project / opensearch-project/data-prepper
[BUG] LeaderPartition cannot be cast to StreamPartition
@graytaylor0 is already working on this.
Since Nov 5, 2024.
- Dominant language
- Java
- Stars
- 374
- Forks
- 354
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Describe the bug
I'm using docker compose which starts an opensearch node and a data-prepper server.
My pipeline is using DynamoDB (AWS not Local) as source, the created opensearch node as sink.
The error is about casting a value from the LeaderPartition type to the StreamPartition type.
To Reproduce
Steps to reproduce the behavior:
- Execute
docker compose up -d --buildto starts all needed services - Execute
docker logs -f docker-dynamodb-opensearch-data-prepper-opensearch-data-prepper-1
Expected behavior
data-prepper server is ready to consume records from DynamoDB stream, then write to Opensearch index
Screenshots
Environment (please complete the following information):
- OS: MacOS Sequoia
- Version 15.1 Beta (24B5055e)
Additional context
docker-compose.yml
version: '3'
services:
opensearch-node:
image: opensearchproject/opensearch
ports:
- "9200:9200"
- "9600:9600"
environment:
- "discovery.type=single-node"
- "plugins.security.disabled=true"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=<OPENSEARCH_INITIAL_ADMIN_PASSWORD>"
networks:
- dynamodb_opensearch
opensearch-dashboard:
image: opensearchproject/opensearch-dashboards:2.11.0
ports:
- "5601:5601"
environment:
- "OPENSEARCH_HOSTS=http://opensearch-node:9200"
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
networks:
- dynamodb_opensearch
opensearch-data-prepper:
image: opensearchproject/data-prepper:latest
environment:
- AWS_PROFILE=my-profile
- AWS_ACCESS_KEY_ID = <AWS_ACCESS_KEY_ID>
- AWS_SECRET_ACCESS_KEY = <AWS_SECRET_ACCESS_KEY>
- AWS_DEFAULT_REGION = eu-west-1
- AWS_REGION = eu-west-1
volumes:
- ~/.aws:/root/.aws
- ./pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml
- ./data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml
ports:
- "21890:21890"
networks:
- dynamodb_opensearch
networks:
dynamodb_opensearch:
driver: bridge
data-prepper-config.yaml
ssl: false
pipelines.yaml
version: "2"
cdc-pipeline:
source:
dynamodb:
acknowledgments: true
tables:
- table_arn: "arn:aws:dynamodb:eu-west-1:123456789:table/my-table"
stream:
start_position: LATEST
view_on_remove: OLD_IMAGE
aws:
region: "eu-west-1"
sink:
- opensearch:
hosts: ["http://opensearch-node:9200"]
index: my-index
index_type: custom
document_id: '${/id}'
action: '${getMetadata("opensearch_action")}'
document_version: '${getMetadata("document_version")}'
document_version_type: external
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.