mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Wow, MSVC mangles the name CreateDirectory
This commit is contained in:
1 parent
990fdc29ff
commit
024579ead3
7 files changed
+13
-13
No files matched your search
@@ -409,7 +409,7 @@ int LibHdfsShim::SetWorkingDirectory(hdfsFS fs, const char* path) {
|
||||
}
|
||||
}
|
||||
|
||||
int LibHdfsShim::CreateDirectory(hdfsFS fs, const char* path) {
|
||||
int LibHdfsShim::MakeDirectory(hdfsFS fs, const char* path) {
|
||||
return this->hdfsCreateDirectory(fs, path);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ struct LibHdfsShim {
|
||||
|
||||
int SetWorkingDirectory(hdfsFS fs, const char* path);
|
||||
|
||||
int CreateDirectory(hdfsFS fs, const char* path);
|
||||
int MakeDirectory(hdfsFS fs, const char* path);
|
||||
|
||||
int SetReplication(hdfsFS fs, const char* path, int16_t replication);
|
||||
|
||||
|
||||
@@ -347,8 +347,8 @@ class HdfsClient::HdfsClientImpl {
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status CreateDirectory(const std::string& path) {
|
||||
int ret = driver_->CreateDirectory(fs_, path.c_str());
|
||||
Status MakeDirectory(const std::string& path) {
|
||||
int ret = driver_->MakeDirectory(fs_, path.c_str());
|
||||
CHECK_FAILURE(ret, "create directory");
|
||||
return Status::OK();
|
||||
}
|
||||
@@ -505,8 +505,8 @@ Status HdfsClient::Connect(
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Status HdfsClient::CreateDirectory(const std::string& path) {
|
||||
return impl_->CreateDirectory(path);
|
||||
Status HdfsClient::MakeDirectory(const std::string& path) {
|
||||
return impl_->MakeDirectory(path);
|
||||
}
|
||||
|
||||
Status HdfsClient::Delete(const std::string& path, bool recursive) {
|
||||
|
||||
@@ -82,7 +82,7 @@ class ARROW_EXPORT HdfsClient : public FileSystemClient {
|
||||
//
|
||||
// @param path (in): absolute HDFS path
|
||||
// @returns Status
|
||||
Status CreateDirectory(const std::string& path);
|
||||
Status MakeDirectory(const std::string& path);
|
||||
|
||||
// Delete file or directory
|
||||
// @param path: absolute path to data
|
||||
|
||||
@@ -45,7 +45,7 @@ class TestHdfsClient : public ::testing::Test {
|
||||
if (client_->Exists(scratch_dir_)) {
|
||||
RETURN_NOT_OK((client_->Delete(scratch_dir_, true)));
|
||||
}
|
||||
return client_->CreateDirectory(scratch_dir_);
|
||||
return client_->MakeDirectory(scratch_dir_);
|
||||
}
|
||||
|
||||
Status WriteDummyFile(const std::string& path, const uint8_t* buffer, int64_t size,
|
||||
@@ -161,14 +161,14 @@ TYPED_TEST(TestHdfsClient, ConnectsAgain) {
|
||||
ASSERT_OK(client->Disconnect());
|
||||
}
|
||||
|
||||
TYPED_TEST(TestHdfsClient, CreateDirectory) {
|
||||
TYPED_TEST(TestHdfsClient, MakeDirectory) {
|
||||
SKIP_IF_NO_DRIVER();
|
||||
|
||||
std::string path = this->ScratchPath("create-directory");
|
||||
|
||||
if (this->client_->Exists(path)) { ASSERT_OK(this->client_->Delete(path, true)); }
|
||||
|
||||
ASSERT_OK(this->client_->CreateDirectory(path));
|
||||
ASSERT_OK(this->client_->MakeDirectory(path));
|
||||
ASSERT_TRUE(this->client_->Exists(path));
|
||||
std::vector<HdfsPathInfo> listing;
|
||||
EXPECT_OK(this->client_->ListDirectory(path, &listing));
|
||||
@@ -253,7 +253,7 @@ TYPED_TEST(TestHdfsClient, ListDirectory) {
|
||||
ASSERT_OK(this->MakeScratchDir());
|
||||
ASSERT_OK(this->WriteDummyFile(p1, data.data(), size));
|
||||
ASSERT_OK(this->WriteDummyFile(p2, data.data(), size / 2));
|
||||
ASSERT_OK(this->client_->CreateDirectory(d1));
|
||||
ASSERT_OK(this->client_->MakeDirectory(d1));
|
||||
|
||||
std::vector<HdfsPathInfo> listing;
|
||||
ASSERT_OK(this->client_->ListDirectory(this->scratch_dir_, &listing));
|
||||
|
||||
@@ -807,7 +807,7 @@ cdef class _HdfsClient:
|
||||
cdef c_string c_path = tobytes(path)
|
||||
with nogil:
|
||||
check_status(self.client.get()
|
||||
.CreateDirectory(c_path))
|
||||
.MakeDirectory(c_path))
|
||||
|
||||
def delete(self, path, bint recursive=False):
|
||||
"""
|
||||
|
||||
@@ -435,7 +435,7 @@ cdef extern from "arrow/io/hdfs.h" namespace "arrow::io" nogil:
|
||||
CStatus Connect(const HdfsConnectionConfig* config,
|
||||
shared_ptr[CHdfsClient]* client)
|
||||
|
||||
CStatus CreateDirectory(const c_string& path)
|
||||
CStatus MakeDirectory(const c_string& path)
|
||||
|
||||
CStatus Delete(const c_string& path, c_bool recursive)
|
||||
|
||||
|
||||
Reference in new issue
Block a user