MCPcopy Create free account
hub / github.com/apache/impala / IsBlacklistableError

Method IsBlacklistableError

be/src/runtime/io/error-converter.cc:57–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool ErrorConverter::IsBlacklistableError(int err_no) {
58 // A set of disk IO related non-transient error codes that should cause failure for
59 // reading/writing file on local disk. These errors could be caused by incorrect
60 // configurations or file system errors, but are not caused by temporarily unavailable
61 // resource, like EAGAIN, ENOMEM, EMFILE, ENFILE and ENOSPC. Since these errors are not
62 // likely disappear soon, the node which frequently hits such disk errors should be
63 // blacklisted.
64 static const set<int32_t> blacklistable_disk_error_codes = {
65 EPERM, // Operation not permitted.
66 ENOENT, // No such file or directory.
67 ESRCH, // No such process.
68 EINTR, // Interrupted system call.
69 EIO, // Disk level I/O error.
70 ENXIO, // No such device or address.
71 E2BIG, // Argument list too long.
72 ENOEXEC, // Exec format error.
73 EBADF, // The given file descriptor is invalid.
74 EACCES, // Permission denied.
75 EFAULT, // Bad address.
76 ENODEV, // No such device
77 ENOTDIR, // It is not a directory.
78 EINVAL, // Invalid argument.
79 EFBIG, // Maximum file size reached.
80 ESPIPE, // Illegal seek.
81 EROFS, // The file system is read only.
82 ENAMETOOLONG, // Either the path length or a path component exceeds the max length.
83 EOVERFLOW}; // File size can't be represented.
84
85 // Return true if the err_no matches any of the 'blacklistable' error code.
86 return (blacklistable_disk_error_codes.find(err_no)
87 != blacklistable_disk_error_codes.end());
88}
89
90bool ErrorConverter::IsBlacklistableError(const Status& status) {
91 // Return true if the error is generated by Debug Action.

Callers

nothing calls this directly

Calls 7

IsInternalErrorMethod · 0.80
IsDiskIoErrorMethod · 0.80
substrMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected