Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 28, 2024
1 parent ff983b1 commit 66152d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <chrono>
#include <memory>
#include <optional>
#include <iostream>

#include "arrow/filesystem/azurefs.h"
#include "arrow/filesystem/azurefs_internal.h"
Expand Down Expand Up @@ -1261,6 +1262,7 @@ class ObjectAppendStream final : public io::OutputStream {
// The closure keeps the buffer and the upload state alive
auto deferred = [owned_buffer, block_id, block_blob_client = block_blob_client_,
state = upload_state_]() mutable -> Status {
std::cout << "Background stage block" << std::endl;
Core::IO::MemoryBodyStream block_content(owned_buffer->data(),
owned_buffer->size());

Expand Down
2 changes: 2 additions & 0 deletions cpp/src/arrow/filesystem/filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "arrow/util/vector.h"
#include "arrow/util/visibility.h"
#include "arrow/util/windows_fixup.h"
#include <iostream>

namespace arrow::fs {

Expand Down Expand Up @@ -632,6 +633,7 @@ Status CopyFiles(const std::vector<FileLocator>& sources,

auto copy_one_file = [&](int i,
const FileLocator& source_file_locator) -> Result<Future<>> {
std::cout << "COPYING file " << i << std::endl;
if (source_file_locator.filesystem->Equals(destinations[i].filesystem)) {
return sources[i].filesystem->CopyFile(sources[i].path, destinations[i].path);
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/filesystem/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void GenericFileSystemTest::TestCopyFile(FileSystem* fs) {

void GenericFileSystemTest::TestCopyFilesBetweenFilesystems(FileSystem* fs) {
// TODO: Ultimately this should test using the in memory fs as the other filesystem.
ASSERT_OK(arrow::io::SetIOThreadPoolCapacity(1000));
ASSERT_OK(arrow::io::SetIOThreadPoolCapacity(10));
auto root_local_fs = std::make_shared<arrow::fs::LocalFileSystem>();
auto local_fs = std::make_shared<arrow::fs::SubTreeFileSystem>("/tmp/arrow_testing/0",
root_local_fs);
Expand All @@ -591,7 +591,7 @@ void GenericFileSystemTest::TestCopyFilesBetweenFilesystems(FileSystem* fs) {
ASSERT_OK(local_fs->CreateDir("EF"));
std::vector<std::string> all_dirs{"AB", "AB/CD", "EF"};
for (const auto& dir : all_dirs) {
for (int i = 0; i <= 10; ++i) {
for (int i = 0; i <= 1000; ++i) {
CreateFile(local_fs.get(), dir + "/" + std::to_string(i), std::string(100, 'a'));
}
}
Expand Down

0 comments on commit 66152d3

Please sign in to comment.