mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #68696 from ucasfl/minor
Use proper ErrorCodes, replace NETWORK_ERROR by HDFS_ERROR
This commit is contained in:
commit
64106e7b3c
@ -22,12 +22,12 @@ namespace DB
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NETWORK_ERROR;
|
||||
extern const int CANNOT_OPEN_FILE;
|
||||
extern const int CANNOT_SEEK_THROUGH_FILE;
|
||||
extern const int SEEK_POSITION_OUT_OF_BOUND;
|
||||
extern const int LOGICAL_ERROR;
|
||||
extern const int UNKNOWN_FILE_SIZE;
|
||||
extern const int HDFS_ERROR;
|
||||
extern const int CANNOT_OPEN_FILE;
|
||||
extern const int CANNOT_SEEK_THROUGH_FILE;
|
||||
extern const int SEEK_POSITION_OUT_OF_BOUND;
|
||||
extern const int LOGICAL_ERROR;
|
||||
extern const int UNKNOWN_FILE_SIZE;
|
||||
}
|
||||
|
||||
|
||||
@ -125,9 +125,12 @@ struct ReadBufferFromHDFS::ReadBufferFromHDFSImpl : public BufferWithOwnMemory<S
|
||||
|
||||
if (bytes_read < 0)
|
||||
{
|
||||
throw Exception(ErrorCodes::NETWORK_ERROR,
|
||||
throw Exception(
|
||||
ErrorCodes::HDFS_ERROR,
|
||||
"Fail to read from HDFS: {}, file path: {}. Error: {}",
|
||||
hdfs_uri, hdfs_file_path, std::string(hdfsGetLastError()));
|
||||
hdfs_uri,
|
||||
hdfs_file_path,
|
||||
std::string(hdfsGetLastError()));
|
||||
}
|
||||
|
||||
if (bytes_read)
|
||||
|
Loading…
Reference in New Issue
Block a user