Package org.apache.hadoop.fs
Class PathIOException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.hadoop.fs.PathIOException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClosedIOException,PathAccessDeniedException,PathExistsException,PathNotFoundException,PathPermissionException
Exceptions based on standard posix/linux style exceptions for path related
errors. Returns an exception with the format "path: standard error string".
This exception corresponds to Error Input/ouput(EIO)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPathIOException(String path) Constructor a generic I/O error exceptionPathIOException(String path, String error) Avoid using this method.PathIOException(String path, String error, Throwable cause) Use a subclass of PathIOException if possible.PathIOException(String path, Throwable cause) Appends the text of a Throwable to the default error message -
Method Summary
Modifier and TypeMethodDescriptionFormat: cmd: {operation} `path' {to `target'}: error stringgetPath()voidsetOperation(String operation) Optional operation that will preface the pathvoidsetTargetPath(String targetPath) Optional path if the exception involved two paths, ex. a copy operationwithFullyQualifiedPath(String fqPath) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PathIOException
Constructor a generic I/O error exception- Parameters:
path- for the exception
-
PathIOException
Appends the text of a Throwable to the default error message- Parameters:
path- for the exceptioncause- a throwable to extract the error message
-
PathIOException
Avoid using this method. Use a subclass of PathIOException if possible.- Parameters:
path- for the exceptionerror- custom string to use an the error text
-
PathIOException
Use a subclass of PathIOException if possible.- Parameters:
path- for the exceptionerror- custom string to use an the error textcause- cause of exception.
-
-
Method Details
-
withFullyQualifiedPath
-
getMessage
Format: cmd: {operation} `path' {to `target'}: error string- Overrides:
getMessagein classThrowable
-
getPath
- Returns:
- Path that generated the exception
-
getTargetPath
- Returns:
- Path if the operation involved copying or moving, else null
-
setOperation
Optional operation that will preface the path- Parameters:
operation- a string
-
setTargetPath
Optional path if the exception involved two paths, ex. a copy operation- Parameters:
targetPath- the of the operation
-