Skip to content

Commit 7d6f0ca

Browse files
committed
Revert "HDFS-15884. RBF: Remove unused method getCreateLocation in RouterRpcServer (#2754). Contributed by tomscut."
This reverts commit e565b05. The removed method needs to be used in HDFS-15423.
1 parent b088f46 commit 7d6f0ca

File tree

1 file changed

+14
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router

1 file changed

+14
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,20 @@ public HdfsFileStatus create(String src, FsPermission masked,
776776
replication, blockSize, supportedVersions, ecPolicyName, storagePolicy);
777777
}
778778

779+
780+
/**
781+
* Get the location to create a file. It checks if the file already existed
782+
* in one of the locations.
783+
*
784+
* @param src Path of the file to check.
785+
* @return The remote location for this file.
786+
* @throws IOException If the file has no creation location.
787+
*/
788+
RemoteLocation getCreateLocation(final String src) throws IOException {
789+
final List<RemoteLocation> locations = getLocationsForPath(src, true);
790+
return getCreateLocation(src, locations);
791+
}
792+
779793
/**
780794
* Get the location to create a file. It checks if the file already existed
781795
* in one of the locations.

0 commit comments

Comments
 (0)