You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/22 20:36:29 UTC

[GitHub] [arrow] wjones127 commented on a diff in pull request #13633: ARROW-17057 [Python] S3FileSystem has no parameter for retry strategy

wjones127 commented on code in PR #13633:
URL: https://github.com/apache/arrow/pull/13633#discussion_r927972891


##########
python/pyarrow/_s3fs.pyx:
##########
@@ -283,6 +287,7 @@ cdef class S3FileSystem(FileSystem):
 
         options.allow_bucket_creation = allow_bucket_creation
         options.allow_bucket_deletion = allow_bucket_deletion
+        options.stock_retry_strategy = stock_retry_strategy

Review Comment:
   Looking into this, it doesn't seem like we should need to modify the C++ code, since the current API will accept the AWS retry strategies. So what if we kept this logic at the Cython level. Something like:
   
   ```suggestion
           if stock_retry_strategy == "standard":
               options.retry_strategy = make_shared[AwsClientStandardRetryStrategy]()
           elif stock_retry_strategy == "adaptive":
               options.retry_strategy = make_shared[AwsClientAdaptiveRetryStrategy]()
           elif isinstance(stock_retry_strategy, str):
               raise ValueError(f"Unknown 'stock_retry_strategy': \"{stock_retry_strategy}\"")
   ```
   
   You would also need to define `AwsClientStandardRetryStrategy` and others inside of `libarrow_fs.pxd`.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org