YARN-6463. Correct spelling mistake in FileSystemRMStateStore. Contributed by Yeliang Cang.
This commit is contained in:
parent
f050afb578
commit
7d873c465b
@ -785,7 +785,7 @@ private FileStatus getFileStatus(Path path) throws Exception {
|
|||||||
* atomic for underlying file system.
|
* atomic for underlying file system.
|
||||||
*/
|
*/
|
||||||
protected void writeFile(Path outputPath, byte[] data, boolean
|
protected void writeFile(Path outputPath, byte[] data, boolean
|
||||||
makeUnradableByAdmin) throws Exception {
|
makeUnreadableByAdmin) throws Exception {
|
||||||
Path tempPath =
|
Path tempPath =
|
||||||
new Path(outputPath.getParent(), outputPath.getName() + ".tmp");
|
new Path(outputPath.getParent(), outputPath.getName() + ".tmp");
|
||||||
FSDataOutputStream fsOut = null;
|
FSDataOutputStream fsOut = null;
|
||||||
@ -793,7 +793,7 @@ protected void writeFile(Path outputPath, byte[] data, boolean
|
|||||||
// final status.
|
// final status.
|
||||||
try {
|
try {
|
||||||
fsOut = fs.create(tempPath, true);
|
fsOut = fs.create(tempPath, true);
|
||||||
if (makeUnradableByAdmin) {
|
if (makeUnreadableByAdmin) {
|
||||||
setUnreadableBySuperuserXattrib(tempPath);
|
setUnreadableBySuperuserXattrib(tempPath);
|
||||||
}
|
}
|
||||||
fsOut.write(data);
|
fsOut.write(data);
|
||||||
@ -811,10 +811,10 @@ protected void writeFile(Path outputPath, byte[] data, boolean
|
|||||||
* atomic for underlying file system.
|
* atomic for underlying file system.
|
||||||
*/
|
*/
|
||||||
protected void updateFile(Path outputPath, byte[] data, boolean
|
protected void updateFile(Path outputPath, byte[] data, boolean
|
||||||
makeUnradableByAdmin) throws Exception {
|
makeUnreadableByAdmin) throws Exception {
|
||||||
Path newPath = new Path(outputPath.getParent(), outputPath.getName() + ".new");
|
Path newPath = new Path(outputPath.getParent(), outputPath.getName() + ".new");
|
||||||
// use writeFileWithRetries to make sure .new file is created atomically
|
// use writeFileWithRetries to make sure .new file is created atomically
|
||||||
writeFileWithRetries(newPath, data, makeUnradableByAdmin);
|
writeFileWithRetries(newPath, data, makeUnreadableByAdmin);
|
||||||
replaceFile(newPath, outputPath);
|
replaceFile(newPath, outputPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user