From d686a655bc36ab68f4dbf66e1c2d0690dd337bd6 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Tue, 29 Sep 2020 00:03:11 +0530 Subject: [PATCH] HDFS-15603. RBF: Fix getLocationsForPath twice in create operation. Contributed by wangzhaohui. --- .../hdfs/server/federation/router/RouterClientProtocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java index e52c0c9014..2c7e90bbdf 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java @@ -288,7 +288,7 @@ public HdfsFileStatus create(String src, FsPermission masked, rpcServer.getLocationsForPath(src, true); RemoteLocation createLocation = null; try { - createLocation = rpcServer.getCreateLocation(src); + createLocation = rpcServer.getCreateLocation(src, locations); return rpcClient.invokeSingle(createLocation, method, HdfsFileStatus.class); } catch (IOException ioe) {