Skip to content
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

Support reading S3 object meta data only #5433

Open
Zhangxunmt opened this issue Feb 13, 2025 · 2 comments · May be fixed by #5470
Open

Support reading S3 object meta data only #5433

Zhangxunmt opened this issue Feb 13, 2025 · 2 comments · May be fixed by #5470
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Zhangxunmt
Copy link

Zhangxunmt commented Feb 13, 2025

Is your feature request related to a problem? Please describe.
The feature request is related to the offline batch ingestion integration with ml-commons. opensearch-project/ml-commons#2891

The S3-Source Scan currently reads the full content of S3 objects. However, for offline ML batch job processing, only object metadata (such as name and size) is required. Reading the entire content can lead to duplicate batch job executions, adding unnecessary overhead.

Describe the solution you'd like
Enhance the S3-Source Scan by introducing an option to retrieve only metadata (e.g., object name, size) instead of reading full object contents. This ensures that batch job processors receive only the required information, preventing redundant job triggers.

Additional context
This improvement would optimize offline batch ingestion while also benefiting future async processors that require metadata without processing full object content.

@dlvenable
Copy link
Member

This sounds like a nice feature to have the S3 scan.

One question we should discuss is whether or not to put the data into the s3 key for consistency or not.

The current S3 scan will create events like:

{
  s3: {
    "key" : "my-key.txt"
    "bucket": "my-bucket"
  }
}

Should we output this? Or move these to the top level?

@Zhangxunmt
Copy link
Author

The first version of this enhancement outputs S3 metadata like this.
{"bucket":"offlinebatch","length":6234,"time":1738108982.000000000,"key":"sagemaker/sagemaker_djl_batch_input_1.json"}

@kkondaka kkondaka linked a pull request Feb 27, 2025 that will close this issue
2 tasks
@dlvenable dlvenable changed the title Support S3-Source Scan for object meta data only Support reading S3 object meta data only Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants