Skip to content

Commit

Permalink
fix path creation
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Aug 2, 2024
1 parent 3619e57 commit 9d92dc5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/velox/benchmarks/common/BenchmarkUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ setLocalDirsAndDataFileFromEnv(std::string& dataFile, std::vector<std::string>&
// Set local dirs.
auto joinedDirs = std::string(joinedDirsC);
// Split local dirs and use thread id to choose one directory for data file.
localDirs = gluten::splitPaths(joinedDirs);
auto dirs = gluten::splitPaths(joinedDirs);
for (const auto& dir : dirs) {
localDirs.push_back(arrow::fs::internal::ConcatAbstractPath(dir, "temp_shuffle_" + generateUuid()));
std::filesystem::create_directory(localDirs.back());
}
size_t id = std::hash<std::thread::id>{}(std::this_thread::get_id()) % localDirs.size();
ARROW_ASSIGN_OR_RAISE(dataFile, gluten::createTempShuffleFile(localDirs[id]));
} else {
Expand Down

0 comments on commit 9d92dc5

Please sign in to comment.