Search in sources :

Example 6 with PathIOException

use of org.apache.hadoop.fs.PathIOException in project hadoop by apache.

the class TestPathExceptions method testWithCustomString.

@Test
public void testWithCustomString() throws Exception {
    PathIOException pe = new PathIOException(path, error);
    assertEquals(new Path(path), pe.getPath());
    assertEquals("`" + path + "': " + error, pe.getMessage());
}
Also used : Path(org.apache.hadoop.fs.Path) PathIOException(org.apache.hadoop.fs.PathIOException) Test(org.junit.Test)

Aggregations

PathIOException (org.apache.hadoop.fs.PathIOException)6 Test (org.junit.Test)4 Path (org.apache.hadoop.fs.Path)3 IOException (java.io.IOException)2 PathIsNotDirectoryException (org.apache.hadoop.fs.PathIsNotDirectoryException)1 RemoteException (org.apache.hadoop.ipc.RemoteException)1