[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions in NameNode
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Akira Ajisaka updated HDFS-11592: - Fix Version/s: 2.9.0 > Closing a file has a wasteful preconditions in NameNode > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode >Reporter: Eric Badger >Assignee: Eric Badger > Fix For: 2.9.0, 3.0.0-alpha4, 2.8.1 > > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions in NameNode
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mingliang Liu updated HDFS-11592: - Resolution: Fixed Hadoop Flags: Reviewed Fix Version/s: 2.8.1 3.0.0-alpha3 Status: Resolved (was: Patch Available) Committed to {{branch-2.8}} through {{trunk}} branches. Thanks for your contribution, [~ebadger]. > Closing a file has a wasteful preconditions in NameNode > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode >Reporter: Eric Badger >Assignee: Eric Badger > Fix For: 3.0.0-alpha3, 2.8.1 > > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions in NameNode
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mingliang Liu updated HDFS-11592: - Target Version/s: 3.0.0-alpha3, 2.8.1 (was: 2.8.1) Component/s: namenode Summary: Closing a file has a wasteful preconditions in NameNode (was: Closing a file has a wasteful preconditions) > Closing a file has a wasteful preconditions in NameNode > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode >Reporter: Eric Badger >Assignee: Eric Badger > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kihwal Lee updated HDFS-11592: -- Target Version/s: 2.8.1 > Closing a file has a wasteful preconditions > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Eric Badger >Assignee: Eric Badger > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Badger updated HDFS-11592: --- Status: Patch Available (was: Open) > Closing a file has a wasteful preconditions > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Eric Badger >Assignee: Eric Badger > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-11592) Closing a file has a wasteful preconditions
[ https://issues.apache.org/jira/browse/HDFS-11592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Badger updated HDFS-11592: --- Attachment: HDFS-11592.001.patch Uploading patch to get rid of Preconditions and just do the expression checking up front. > Closing a file has a wasteful preconditions > --- > > Key: HDFS-11592 > URL: https://issues.apache.org/jira/browse/HDFS-11592 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Eric Badger >Assignee: Eric Badger > Attachments: HDFS-11592.001.patch > > > When a file is closed, the NN checks if all the blocks are complete. Instead > of a simple 'if (!complete) throw new IllegalState(expensive-err-string)" it > invokes "Preconditions.checkStatus(complete, expensive-err-string)". The > check is done in a loop for all blocks, so more blocks = more penalty. The > expensive string should only be computed when an error actually occurs. A > telltale sign is seeing this in a stacktrace: > {noformat} >at java.lang.Class.getEnclosingMethod0(Native Method) > at java.lang.Class.getEnclosingMethodInfo(Class.java:1072) > at java.lang.Class.getEnclosingClass(Class.java:1272) > at java.lang.Class.getSimpleBinaryName(Class.java:1443) > at java.lang.Class.getSimpleName(Class.java:1309) > at > org.apache.hadoop.hdfs.server.namenode.INodeFile.assertAllBlocksComplete(INodeFile.java:246) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org