kou commented on code in PR #45021:
URL: https://github.com/apache/arrow/pull/45021#discussion_r1885449477


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -3186,9 +3180,19 @@ class AzureFileSystem::Impl {
       }
     }
     try {
-      dest_blob_client.CopyFromUri(src_url);
+      // We use StartCopyFromUri instead of CopyFromUri because it supports 
blobs larger
+      // than 256 MiB and it doesn't require generating a SAS token to 
authenticate
+      // reading a source blob in the same storage account.
+      auto copy_operation = dest_blob_client.StartCopyFromUri(src_url);

Review Comment:
   Wow! I should have found it when I implement this...



##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -690,6 +690,36 @@ class TestAzureOptions : public ::testing::Test {
     ASSERT_EQ(options.credential_kind_, 
AzureOptions::CredentialKind::kEnvironment);
   }
 
+  void TestFromUriCredentialSasToken() {

Review Comment:
   ```suggestion
     void TestFromUriCredentialSASToken() {
   ```



##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -311,6 +321,15 @@ Status AzureOptions::ConfigureAccountKeyCredential(const 
std::string& account_ke
   return Status::OK();
 }
 
+Status AzureOptions::ConfigureSasCredential(const std::string& sas_token) {

Review Comment:
   ```suggestion
   Status AzureOptions::ConfigureSASCredential(const std::string& sas_token) {
   ```



##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -3186,9 +3180,19 @@ class AzureFileSystem::Impl {
       }
     }
     try {
-      dest_blob_client.CopyFromUri(src_url);
+      // We use StartCopyFromUri instead of CopyFromUri because it supports 
blobs larger
+      // than 256 MiB and it doesn't require generating a SAS token to 
authenticate
+      // reading a source blob in the same storage account.
+      auto copy_operation = dest_blob_client.StartCopyFromUri(src_url);
+      copy_operation.PollUntilDone(std::chrono::milliseconds(1000));

Review Comment:
   Could you add a comment what `std::chrono::milliseconds(1000)` means?



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to