HADOOP-18100: Change scope of inner classes in InodeTree to make them accessible outside package
Fixes #3950
Signed-off-by: Owen O'Malley <omalley@apache.org>
Cherry-picked from 3684c7f6
by Owen O'Malley
This commit is contained in:
parent
87ff57765a
commit
8b03514eaf
|
@ -20,15 +20,17 @@ package org.apache.hadoop.fs.viewfs;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience.Private;
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File system instance getter.
|
* File system instance getter.
|
||||||
*/
|
*/
|
||||||
@Private
|
@InterfaceAudience.LimitedPrivate({"Common"})
|
||||||
class FsGetter {
|
@InterfaceStability.Unstable
|
||||||
|
public class FsGetter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets new file system instance of given uri.
|
* Gets new file system instance of given uri.
|
||||||
|
|
|
@ -81,7 +81,7 @@ abstract class InodeTree<T> {
|
||||||
private List<RegexMountPoint<T>> regexMountPointList =
|
private List<RegexMountPoint<T>> regexMountPointList =
|
||||||
new ArrayList<RegexMountPoint<T>>();
|
new ArrayList<RegexMountPoint<T>>();
|
||||||
|
|
||||||
static class MountPoint<T> {
|
public static class MountPoint<T> {
|
||||||
String src;
|
String src;
|
||||||
INodeLink<T> target;
|
INodeLink<T> target;
|
||||||
|
|
||||||
|
@ -89,6 +89,22 @@ abstract class InodeTree<T> {
|
||||||
src = srcPath;
|
src = srcPath;
|
||||||
target = mountLink;
|
target = mountLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the source of mount point.
|
||||||
|
* @return The source
|
||||||
|
*/
|
||||||
|
public String getSource() {
|
||||||
|
return this.src;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the target link.
|
||||||
|
* @return The target INode link
|
||||||
|
*/
|
||||||
|
public INodeLink<T> getTarget() {
|
||||||
|
return this.target;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -256,7 +272,7 @@ abstract class InodeTree<T> {
|
||||||
* For a merge, each target is checked to be dir when created but if target
|
* For a merge, each target is checked to be dir when created but if target
|
||||||
* is changed later it is then ignored (a dir with null entries)
|
* is changed later it is then ignored (a dir with null entries)
|
||||||
*/
|
*/
|
||||||
static class INodeLink<T> extends INode<T> {
|
public static class INodeLink<T> extends INode<T> {
|
||||||
final URI[] targetDirLinkList;
|
final URI[] targetDirLinkList;
|
||||||
private T targetFileSystem; // file system object created from the link.
|
private T targetFileSystem; // file system object created from the link.
|
||||||
// Function to initialize file system. Only applicable for simple links
|
// Function to initialize file system. Only applicable for simple links
|
||||||
|
@ -290,7 +306,7 @@ abstract class InodeTree<T> {
|
||||||
* Get the target of the link. If a merge link then it returned
|
* Get the target of the link. If a merge link then it returned
|
||||||
* as "," separated URI list.
|
* as "," separated URI list.
|
||||||
*/
|
*/
|
||||||
Path getTargetLink() {
|
public Path getTargetLink() {
|
||||||
StringBuilder result = new StringBuilder(targetDirLinkList[0].toString());
|
StringBuilder result = new StringBuilder(targetDirLinkList[0].toString());
|
||||||
// If merge link, use "," as separator between the merged URIs
|
// If merge link, use "," as separator between the merged URIs
|
||||||
for (int i = 1; i < targetDirLinkList.length; ++i) {
|
for (int i = 1; i < targetDirLinkList.length; ++i) {
|
||||||
|
@ -933,7 +949,7 @@ abstract class InodeTree<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MountPoint<T>> getMountPoints() {
|
public List<MountPoint<T>> getMountPoints() {
|
||||||
return mountPoints;
|
return mountPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue