This is an automated email from the ASF dual-hosted git repository.
omalley pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new f72dc63 HADOOP-18100: Change scope of inner classes in InodeTree to
make them accessible outside package
f72dc63 is described below
commit f72dc63d8ba29056c6b92c36b9e12555cd56c8ab
Author: Abhishek Das <[email protected]>
AuthorDate: Mon Jan 31 15:19:43 2022 -0800
HADOOP-18100: Change scope of inner classes in InodeTree to make them
accessible outside package
Fixes #3950
Signed-off-by: Owen O'Malley <[email protected]>
Cherry-picked from 3684c7f6 by Owen O'Malley
---
.../java/org/apache/hadoop/fs/viewfs/FsGetter.java | 8 +++++---
.../org/apache/hadoop/fs/viewfs/InodeTree.java | 24 ++++++++++++++++++----
2 files changed, 25 insertions(+), 7 deletions(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/FsGetter.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/FsGetter.java
index 071af11..c72baac 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/FsGetter.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/FsGetter.java
@@ -20,15 +20,17 @@ package org.apache.hadoop.fs.viewfs;
import java.io.IOException;
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.fs.FileSystem;
/**
* File system instance getter.
*/
-@Private
-class FsGetter {
[email protected]({"Common"})
[email protected]
+public class FsGetter {
/**
* Gets new file system instance of given uri.
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java
index 65ca2f8..4053a9f 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java
@@ -74,7 +74,7 @@ abstract class InodeTree<T> {
private final String homedirPrefix;
private List<MountPoint<T>> mountPoints = new ArrayList<MountPoint<T>>();
- static class MountPoint<T> {
+ public static class MountPoint<T> {
String src;
INodeLink<T> target;
@@ -82,6 +82,22 @@ abstract class InodeTree<T> {
src = srcPath;
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;
+ }
}
/**
@@ -242,7 +258,7 @@ abstract class InodeTree<T> {
* 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)
*/
- static class INodeLink<T> extends INode<T> {
+ public static class INodeLink<T> extends INode<T> {
final URI[] targetDirLinkList;
private T targetFileSystem; // file system object created from the link.
// Function to initialize file system. Only applicable for simple links
@@ -276,7 +292,7 @@ abstract class InodeTree<T> {
* Get the target of the link. If a merge link then it returned
* as "," separated URI list.
*/
- Path getTargetLink() {
+ public Path getTargetLink() {
StringBuilder result = new
StringBuilder(targetDirLinkList[0].toString());
// If merge link, use "," as separator between the merged URIs
for (int i = 1; i < targetDirLinkList.length; ++i) {
@@ -770,7 +786,7 @@ abstract class InodeTree<T> {
return res;
}
- List<MountPoint<T>> getMountPoints() {
+ public List<MountPoint<T>> getMountPoints() {
return mountPoints;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]