[ https://issues.apache.org/jira/browse/HDFS-17363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
farmmamba resolved HDFS-17363. ------------------------------ Resolution: Not A Problem > Avoid initializing unnecessary objects in method getBlockRecoveryCommand > ------------------------------------------------------------------------ > > Key: HDFS-17363 > URL: https://issues.apache.org/jira/browse/HDFS-17363 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Reporter: farmmamba > Assignee: farmmamba > Priority: Major > > In method getBlockRecoveryCommand, we have below codes: > {code:java} > else { > rBlock = new RecoveringBlock(primaryBlock, recoveryInfos, > uc.getBlockRecoveryId()); > if (b.isStriped()) { > rBlock = new RecoveringStripedBlock(rBlock, > uc.getBlockIndicesForSpecifiedStorages(storageIdx), > ((BlockInfoStriped) b).getErasureCodingPolicy()); > } {code} > It seems that we initialize RecoveringBlock object every time even though > b.isStriped returns true. > This is unnecessary. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org