|
@@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
|
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
|
import org.apache.hadoop.fs.FSDataInputStream;
|
|
import org.apache.hadoop.fs.FSDataInputStream;
|
|
import org.apache.hadoop.fs.FileStatus;
|
|
import org.apache.hadoop.fs.FileStatus;
|
|
|
|
+import org.apache.hadoop.fs.InvalidPathHandleException;
|
|
import org.apache.hadoop.fs.Options.HandleOpt;
|
|
import org.apache.hadoop.fs.Options.HandleOpt;
|
|
import org.apache.hadoop.fs.Path;
|
|
import org.apache.hadoop.fs.Path;
|
|
import org.apache.hadoop.fs.PathHandle;
|
|
import org.apache.hadoop.fs.PathHandle;
|
|
@@ -241,7 +242,7 @@ public abstract class AbstractContractOpenTest
|
|
// fail to resolve if path1 had been modified
|
|
// fail to resolve if path1 had been modified
|
|
instream = getFileSystem().open(fd1);
|
|
instream = getFileSystem().open(fd1);
|
|
fail("Expected an exception");
|
|
fail("Expected an exception");
|
|
- } catch (IOException e) {
|
|
|
|
|
|
+ } catch (InvalidPathHandleException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
|
|
|
|
@@ -290,7 +291,7 @@ public abstract class AbstractContractOpenTest
|
|
// handle should not resolve when content changed
|
|
// handle should not resolve when content changed
|
|
instream = getFileSystem().open(fd);
|
|
instream = getFileSystem().open(fd);
|
|
fail("Failed to detect change to content");
|
|
fail("Failed to detect change to content");
|
|
- } catch (IOException e) {
|
|
|
|
|
|
+ } catch (InvalidPathHandleException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -330,7 +331,7 @@ public abstract class AbstractContractOpenTest
|
|
// verify attempt to resolve the handle fails
|
|
// verify attempt to resolve the handle fails
|
|
instream = getFileSystem().open(fd1);
|
|
instream = getFileSystem().open(fd1);
|
|
fail("Expected an exception");
|
|
fail("Expected an exception");
|
|
- } catch (IOException e) {
|
|
|
|
|
|
+ } catch (InvalidPathHandleException e) {
|
|
// expected
|
|
// expected
|
|
}
|
|
}
|
|
|
|
|