acezen commented on code in PR #571:
URL: https://github.com/apache/incubator-graphar/pull/571#discussion_r1703604347


##########
cpp/src/graphar/filesystem.h:
##########
@@ -153,4 +153,15 @@ class FileSystem {
 Result<std::shared_ptr<FileSystem>> FileSystemFromUriOrPath(
     const std::string& uri, std::string* out_path = nullptr);
 
+/**
+ * @brief Shutdown the S3 APIs.
+ *
+ * This function should be called before the program exits to ensure that
+ * all S3 resources are properly released.
+ *
+ * This function calls arrow:fs::FinalizeS3() internally.
+ *
+ */
+Status FinalizeS3();

Review Comment:
   We can not put the `FinalizeS3` to the `~FileSystem`, since according 
arrow's design, the  `InitializeS3` and `FinalizeS3` is not binding to a 
`FileSystem` object and just use to initialize and finalize the APIs of AWS S3 
SDK[1][2]. So I add an `InitializeS3` API to let user to initialize S3 APIs 
explicitly.
   
   [1] 
   
https://github.com/apache/arrow/blob/bae2908b3142f1141941d740d42c5d403c01749f/cpp/src/arrow/filesystem/s3fs.h#L400-L408
   [2]
   
https://github.com/apache/arrow/blob/bae2908b3142f1141941d740d42c5d403c01749f/cpp/src/arrow/filesystem/CMakeLists.txt#L94-L100



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to