|
@@ -230,7 +230,7 @@ abstract class InodeTree<T> {
|
|
|
* is changed later it is then ignored (a dir with null entries)
|
|
|
*/
|
|
|
static class INodeLink<T> extends INode<T> {
|
|
|
- final URI[] targetDirLinkList;
|
|
|
+ final String[] targetDirLinkList;
|
|
|
private T targetFileSystem; // file system object created from the link.
|
|
|
// Function to initialize file system. Only applicable for simple links
|
|
|
private Function<URI, T> fileSystemInitMethod;
|
|
@@ -240,7 +240,7 @@ abstract class InodeTree<T> {
|
|
|
* Construct a mergeLink or nfly.
|
|
|
*/
|
|
|
INodeLink(final String pathToNode, final UserGroupInformation aUgi,
|
|
|
- final T targetMergeFs, final URI[] aTargetDirLinkList) {
|
|
|
+ final T targetMergeFs, final String[] aTargetDirLinkList) {
|
|
|
super(pathToNode, aUgi);
|
|
|
targetFileSystem = targetMergeFs;
|
|
|
targetDirLinkList = aTargetDirLinkList;
|
|
@@ -251,11 +251,11 @@ abstract class InodeTree<T> {
|
|
|
*/
|
|
|
INodeLink(final String pathToNode, final UserGroupInformation aUgi,
|
|
|
Function<URI, T> createFileSystemMethod,
|
|
|
- final URI aTargetDirLink) {
|
|
|
+ final String aTargetDirLink) throws URISyntaxException {
|
|
|
super(pathToNode, aUgi);
|
|
|
targetFileSystem = null;
|
|
|
- targetDirLinkList = new URI[1];
|
|
|
- targetDirLinkList[0] = aTargetDirLink;
|
|
|
+ targetDirLinkList = new String[1];
|
|
|
+ targetDirLinkList[0] = new URI(aTargetDirLink).toString();
|
|
|
this.fileSystemInitMethod = createFileSystemMethod;
|
|
|
}
|
|
|
|
|
@@ -293,7 +293,8 @@ abstract class InodeTree<T> {
|
|
|
if (targetFileSystem != null) {
|
|
|
return targetFileSystem;
|
|
|
}
|
|
|
- targetFileSystem = fileSystemInitMethod.apply(targetDirLinkList[0]);
|
|
|
+ targetFileSystem =
|
|
|
+ fileSystemInitMethod.apply(URI.create(targetDirLinkList[0]));
|
|
|
if (targetFileSystem == null) {
|
|
|
throw new IOException(
|
|
|
"Could not initialize target File System for URI : " +
|
|
@@ -361,7 +362,7 @@ abstract class InodeTree<T> {
|
|
|
switch (linkType) {
|
|
|
case SINGLE:
|
|
|
newLink = new INodeLink<T>(fullPath, aUgi,
|
|
|
- initAndGetTargetFs(), new URI(target));
|
|
|
+ initAndGetTargetFs(), target);
|
|
|
break;
|
|
|
case SINGLE_FALLBACK:
|
|
|
case MERGE_SLASH:
|
|
@@ -370,10 +371,10 @@ abstract class InodeTree<T> {
|
|
|
throw new IllegalArgumentException("Unexpected linkType: " + linkType);
|
|
|
case MERGE:
|
|
|
case NFLY:
|
|
|
- final URI[] targetUris = StringUtils.stringToURI(
|
|
|
- StringUtils.getStrings(target));
|
|
|
+ final String[] targetUris = StringUtils.getStrings(target);
|
|
|
newLink = new INodeLink<T>(fullPath, aUgi,
|
|
|
- getTargetFileSystem(settings, targetUris), targetUris);
|
|
|
+ getTargetFileSystem(settings, StringUtils.stringToURI(targetUris)),
|
|
|
+ targetUris);
|
|
|
break;
|
|
|
default:
|
|
|
throw new IllegalArgumentException(linkType + ": Infeasible linkType");
|
|
@@ -582,8 +583,7 @@ abstract class InodeTree<T> {
|
|
|
if (isMergeSlashConfigured) {
|
|
|
Preconditions.checkNotNull(mergeSlashTarget);
|
|
|
root = new INodeLink<T>(mountTableName, ugi,
|
|
|
- initAndGetTargetFs(),
|
|
|
- new URI(mergeSlashTarget));
|
|
|
+ initAndGetTargetFs(), mergeSlashTarget);
|
|
|
mountPoints.add(new MountPoint<T>("/", (INodeLink<T>) root));
|
|
|
rootFallbackLink = null;
|
|
|
} else {
|
|
@@ -600,8 +600,7 @@ abstract class InodeTree<T> {
|
|
|
+ "not allowed.");
|
|
|
}
|
|
|
fallbackLink = new INodeLink<T>(mountTableName, ugi,
|
|
|
- initAndGetTargetFs(),
|
|
|
- new URI(le.getTarget()));
|
|
|
+ initAndGetTargetFs(), le.getTarget());
|
|
|
} else {
|
|
|
createLink(le.getSrc(), le.getTarget(), le.getLinkType(),
|
|
|
le.getSettings(), le.getUgi(), le.getConfig());
|