Skip to content

Commit 6e6131f

Browse files
author
Ritesh Garg
committed
PR comments
1 parent f35d716 commit 6e6131f

File tree

1 file changed

+3
-2
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs

1 file changed

+3
-2
lines changed

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,8 +1846,9 @@ protected void setupPipelineForCreate() throws IOException {
18461846
dfsClient.namenode.abandonBlock(block.getCurrentBlock(),
18471847
stat.getFileId(), src, dfsClient.clientName);
18481848
block.setCurrentBlock(null);
1849-
final DatanodeInfo badNode =
1850-
errorState.getBadNodeIndex() == -1 ? Iterables.getLast(failed) : nodes[errorState.getBadNodeIndex()];
1849+
final DatanodeInfo badNode = errorState.getBadNodeIndex() == -1
1850+
? Iterables.getLast(failed)
1851+
: nodes[errorState.getBadNodeIndex()];
18511852
LOG.warn("Excluding datanode " + badNode);
18521853
excludedNodes.put(badNode, badNode);
18531854
setPipeline(null, null, null);

0 commit comments

Comments
 (0)