[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14268687#comment-14268687 ] Hadoop QA commented on YARN-2996: - {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12690673/YARN-2996.004.patch against trunk revision ef237bd. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart Test results: https://builds.apache.org/job/PreCommit-YARN-Build/6274//testReport/ Console output: https://builds.apache.org/job/PreCommit-YARN-Build/6274//console This message is automatically generated. > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269728#comment-14269728 ] Zhijie Shen commented on YARN-2996: --- +1. The test failure seems not to be related. Will commit the patch. > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269754#comment-14269754 ] Hudson commented on YARN-2996: -- FAILURE: Integrated in Hadoop-trunk-Commit #6830 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/6830/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/CHANGES.txt * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270274#comment-14270274 ] Yi Liu commented on YARN-2996: -- Thanks [~zjshen] for review and commit. > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270907#comment-14270907 ] Hudson commented on YARN-2996: -- FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #68 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/68/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/CHANGES.txt > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270931#comment-14270931 ] Hudson commented on YARN-2996: -- SUCCESS: Integrated in Hadoop-Yarn-trunk #802 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/802/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/CHANGES.txt * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271063#comment-14271063 ] Hudson commented on YARN-2996: -- FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #65 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/65/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java * hadoop-yarn-project/CHANGES.txt * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271071#comment-14271071 ] Hudson commented on YARN-2996: -- SUCCESS: Integrated in Hadoop-Hdfs-trunk #2000 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/2000/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/CHANGES.txt > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271097#comment-14271097 ] Hudson commented on YARN-2996: -- FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #69 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/69/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java * hadoop-yarn-project/CHANGES.txt > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2996) Refine fs operations in FileSystemRMStateStore and few fixes
[ https://issues.apache.org/jira/browse/YARN-2996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271173#comment-14271173 ] Hudson commented on YARN-2996: -- SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2019 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2019/]) YARN-2996. Improved synchronization and I/O operations of FS- and Mem- RMStateStore. Contributed by Yi Liu. (zjshen: rev dc2eaa26b20cfbbcdd5784bb8761d08a42f29605) * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/FileSystemRMStateStore.java * hadoop-yarn-project/CHANGES.txt * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/MemoryRMStateStore.java > Refine fs operations in FileSystemRMStateStore and few fixes > > > Key: YARN-2996 > URL: https://issues.apache.org/jira/browse/YARN-2996 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager >Reporter: Yi Liu >Assignee: Yi Liu > Fix For: 2.7.0 > > Attachments: YARN-2996.001.patch, YARN-2996.002.patch, > YARN-2996.003.patch, YARN-2996.004.patch > > > In {{FileSystemRMStateStore}}, we can refine some fs operations to improve > performance: > *1.* There are several places invoke {{fs.exists}}, then > {{fs.getFileStatus}}, we can merge them to save one RPC call > {code} > if (fs.exists(versionNodePath)) { > FileStatus status = fs.getFileStatus(versionNodePath); > {code} > *2.* > {code} > protected void updateFile(Path outputPath, byte[] data) throws Exception { > Path newPath = new Path(outputPath.getParent(), outputPath.getName() + > ".new"); > // use writeFile to make sure .new file is created atomically > writeFile(newPath, data); > replaceFile(newPath, outputPath); > } > {code} > The {{updateFile}} is not good too, it write file to _output\_file_.tmp, then > rename to _output\_file_.new, then rename it to _output\_file_, we can reduce > one rename operation. > Also there is one unnecessary import, we can remove it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)