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/27 21:11:20 UTC

[GitHub] [arrow-rs] alamb opened a new issue, #2203: object_store: Make builder style configuration for object stores

alamb opened a new issue, #2203:
URL: https://github.com/apache/arrow-rs/issues/2203

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   While working on a writeup of the object store donation, in https://github.com/apache/arrow-rs/issues/2030, I wanted to write up some examples.
   
   It turns out that the API to create s3 (and the others is somewhat messy as it takes 8 parameters:
   
   ```rust
   fn get_object_store() -> Arc<dyn ObjectStore> {
       let s3 = object_store::aws::new_s3(
           Some(ACCESS_KEY_ID),
           Some(SECRET_KEY),
           REGION,
           BUCKET_NAME,        // TODO this is messy, rust complains about not being able to infer types                                                                                                   
           None as Option<&str>, // endpoint                                                                                                                                           
           None as Option<&str>, // token                                                                                                                                              
           NonZeroUsize::new(16).unwrap(),
           false, // allow http                              
                                                                                                                             
       )
           .expect("error creating s3");
       Arc::new(s3)
   }
   ```
   
   
   **Describe the solution you'd like**
   I would like a builder so I can make an S3 connection specifying only the options I care to override:
   
   ```rust
   let s3 = object_store::aws::ConfigBuilder::new()
     .with_region(REGION)
     .with_bucket(BUCKET_NAME)
     .with_access_key(ACCESS_KEY_ID)
     .with_secreate_key(SECRET_KEY)
     .build();
   ```
   
   **Describe alternatives you've considered**
   Living with the pain !
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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.apache.org

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


[GitHub] [arrow-rs] alamb closed issue #2203: object_store: Make builder style configuration for object stores

Posted by GitBox <gi...@apache.org>.
alamb closed issue #2203: object_store: Make builder style configuration for object stores
URL: https://github.com/apache/arrow-rs/issues/2203


-- 
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