mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 13:32:13 +00:00
Update ReadBufferFromHDFS.cpp
This commit is contained in:
parent
dd85c3c114
commit
74c0574d51
@ -75,7 +75,10 @@ struct ReadBufferFromHDFS::ReadBufferFromHDFSImpl : public BufferWithOwnMemory<S
|
|||||||
{
|
{
|
||||||
auto * file_info = hdfsGetPathInfo(fs.get(), hdfs_file_path.c_str());
|
auto * file_info = hdfsGetPathInfo(fs.get(), hdfs_file_path.c_str());
|
||||||
if (!file_info)
|
if (!file_info)
|
||||||
|
{
|
||||||
|
hdfsCloseFile(fs.get(), fin);
|
||||||
throw Exception(ErrorCodes::UNKNOWN_FILE_SIZE, "Cannot find out file size for: {}", hdfs_file_path);
|
throw Exception(ErrorCodes::UNKNOWN_FILE_SIZE, "Cannot find out file size for: {}", hdfs_file_path);
|
||||||
|
}
|
||||||
file_size = static_cast<size_t>(file_info->mSize);
|
file_size = static_cast<size_t>(file_info->mSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user