[ https://issues.apache.org/jira/browse/HDFS-15115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027262#comment-17027262 ]
Ayush Saxena edited comment on HDFS-15115 at 1/31/20 8:04 AM: -------------------------------------------------------------- Thanx Everyone for the work here Well there are two approaches possible here first is the old one, having null check and one in the v2 patch that is initializing builder irrespective of log level. Well personally I prefer having the previous approach of null check, but I am ok doing this way too, if everyone prefers this. [~weichiu] [~hexiaoqiao] any preferences??? Anyway [~belugabehr] [~wzx513] possible extending a UT? Not sure must be tricky to change the log level in middle, just give a check once. was (Author: ayushtkn): Thanx Everyone for the work here? Well there are two approaches possible here first is the old one, having null check and one in the v2 patch that is initializing builder irrespective of log level. Well personally I prefer having the previous approach of null check, but I am ok doing this way too, if everyone prefers this. [~weichiu] [~hexiaoqiao] any preferences??? Anyway [~belugabehr] [~wzx513] possible extending a UT? Not sure must be tricky to change the log level in middle, just give a check once. > Namenode crash caused by NPE in BlockPlacementPolicyDefault when dynamically > change logger to debug > --------------------------------------------------------------------------------------------------- > > Key: HDFS-15115 > URL: https://issues.apache.org/jira/browse/HDFS-15115 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: wangzhixiang > Assignee: David Mollitor > Priority: Major > Attachments: HDFS-15115.001.patch, HDFS-15115.2.patch > > > To get debug info, we dynamically change the logger of > BlockPlacementPolicyDefault to debug when namenode is running. However, the > Namenode crashs. From the log, we find some NPE in > BlockPlacementPolicyDefault.chooseRandom. Because *StringBuilder builder* > will be used 4 times in BlockPlacementPolicyDefault.chooseRandom method. > While the *builder* only initializes in the first time of this method. If we > change the logger of BlockPlacementPolicyDefault to debug after the part, the > *builder* in remaining part is *NULL* and cause *NPE* -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org