From b04c09163be7d9e73e7e05afd633395b27e2434a Mon Sep 17 00:00:00 2001 From: Naganarasimha Date: Tue, 11 Apr 2017 22:42:08 +0530 Subject: [PATCH] YARN-6463. Correct spelling mistake in FileSystemRMStateStore. Contributed by Yeliang Cang. (cherry picked from commit 7d873c465b815816e9955cf40f4e141dd2e7d82b) --- .../resourcemanager/recovery/FileSystemRMStateStore.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java index 9ea5e8c6baf..71e16234d9b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java @@ -790,7 +790,7 @@ public class FileSystemRMStateStore extends RMStateStore { * atomic for underlying file system. */ protected void writeFile(Path outputPath, byte[] data, boolean - makeUnradableByAdmin) throws Exception { + makeUnreadableByAdmin) throws Exception { Path tempPath = new Path(outputPath.getParent(), outputPath.getName() + ".tmp"); FSDataOutputStream fsOut = null; @@ -798,7 +798,7 @@ public class FileSystemRMStateStore extends RMStateStore { // final status. try { fsOut = fs.create(tempPath, true); - if (makeUnradableByAdmin) { + if (makeUnreadableByAdmin) { setUnreadableBySuperuserXattrib(tempPath); } fsOut.write(data); @@ -816,10 +816,10 @@ public class FileSystemRMStateStore extends RMStateStore { * atomic for underlying file system. */ protected void updateFile(Path outputPath, byte[] data, boolean - makeUnradableByAdmin) throws Exception { + makeUnreadableByAdmin) throws Exception { Path newPath = new Path(outputPath.getParent(), outputPath.getName() + ".new"); // use writeFileWithRetries to make sure .new file is created atomically - writeFileWithRetries(newPath, data, makeUnradableByAdmin); + writeFileWithRetries(newPath, data, makeUnreadableByAdmin); replaceFile(newPath, outputPath); }