wjones127 commented on PR #35808:
URL: https://github.com/apache/arrow/pull/35808#issuecomment-1566303323
✅ I've tested this locally against S3 and R2 with the following script:
```python
import pyarrow.fs as pa_fs
import os
# 25 MB across 7 pieces
pieces = 7
piece_size = 25 * 1024 * 1024 // pieces
bucket_name = os.environ["OBJECT_STORE_BUCKET"]
fs = pa_fs.S3FileSystem(
access_key=os.environ["AWS_ACCESS_KEY_ID"],
secret_key=os.environ["AWS_SECRET_ACCESS_KEY"],
endpoint_override=os.environ.get("OBJECT_STORE_AWS_ENDPOINT"),
region="us-west-2",
)
with fs.open_output_stream(f"{bucket_name}/my_test_file.txt") as f:
for i in range(pieces):
f.write(b"0" * piece_size)
info = fs.get_file_info(f"{bucket_name}/my_test_file.txt")
assert info.size == piece_size * pieces
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]