Revert an errant commit of HADOOP-8616.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1392705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d1f4ec4ac8
commit
c808caea75
|
@ -307,9 +307,6 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HADOOP-8791. Fix rm command documentation to indicte it deletes
|
HADOOP-8791. Fix rm command documentation to indicte it deletes
|
||||||
files and not directories. (Jing Zhao via suresh)
|
files and not directories. (Jing Zhao via suresh)
|
||||||
|
|
||||||
HADOOP-8616. ViewFS configuration requires a trailing slash. (Sandy Ryza
|
|
||||||
via atm)
|
|
||||||
|
|
||||||
Release 2.0.2-alpha - 2012-09-07
|
Release 2.0.2-alpha - 2012-09-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -89,11 +89,7 @@ class ChRootedFileSystem extends FilterFileSystem {
|
||||||
public ChRootedFileSystem(final URI uri, Configuration conf)
|
public ChRootedFileSystem(final URI uri, Configuration conf)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
super(FileSystem.get(uri, conf));
|
super(FileSystem.get(uri, conf));
|
||||||
String pathString = uri.getPath();
|
chRootPathPart = new Path(uri.getPath());
|
||||||
if (pathString.isEmpty()) {
|
|
||||||
pathString = "/";
|
|
||||||
}
|
|
||||||
chRootPathPart = new Path(pathString);
|
|
||||||
chRootPathPartString = chRootPathPart.toUri().getPath();
|
chRootPathPartString = chRootPathPart.toUri().getPath();
|
||||||
myUri = uri;
|
myUri = uri;
|
||||||
workingDir = getHomeDirectory();
|
workingDir = getHomeDirectory();
|
||||||
|
|
|
@ -205,13 +205,9 @@ public class ViewFs extends AbstractFileSystem {
|
||||||
protected
|
protected
|
||||||
AbstractFileSystem getTargetFileSystem(final URI uri)
|
AbstractFileSystem getTargetFileSystem(final URI uri)
|
||||||
throws URISyntaxException, UnsupportedFileSystemException {
|
throws URISyntaxException, UnsupportedFileSystemException {
|
||||||
String pathString = uri.getPath();
|
|
||||||
if (pathString.isEmpty()) {
|
|
||||||
pathString = "/";
|
|
||||||
}
|
|
||||||
return new ChRootedFs(
|
return new ChRootedFs(
|
||||||
AbstractFileSystem.createFileSystem(uri, config),
|
AbstractFileSystem.createFileSystem(uri, config),
|
||||||
new Path(pathString));
|
new Path(uri.getPath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -342,15 +342,6 @@ public class TestChRootedFileSystem {
|
||||||
chrootFs.close();
|
chrootFs.close();
|
||||||
verify(mockFs).delete(eq(rawPath), eq(true));
|
verify(mockFs).delete(eq(rawPath), eq(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testURIEmptyPath() throws IOException {
|
|
||||||
Configuration conf = new Configuration();
|
|
||||||
conf.setClass("fs.mockfs.impl", MockFileSystem.class, FileSystem.class);
|
|
||||||
|
|
||||||
URI chrootUri = URI.create("mockfs://foo");
|
|
||||||
new ChRootedFileSystem(chrootUri, conf);
|
|
||||||
}
|
|
||||||
|
|
||||||
static class MockFileSystem extends FilterFileSystem {
|
static class MockFileSystem extends FilterFileSystem {
|
||||||
MockFileSystem() {
|
MockFileSystem() {
|
||||||
|
|
Loading…
Reference in New Issue