Skip to content

Commit 2c653c9

Browse files
committed
fix checkstyle
1 parent 83bc303 commit 2c653c9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static DFSOutputStream newStreamForCreate(DFSClient dfsClient, String src,
340340

341341
/** Construct a new output stream for append. */
342342
private DFSOutputStream(DFSClient dfsClient, String src,
343-
EnumSet<CreateFlag> flags, Progressable progress, LocatedBlock userAssignmentLastBlock,
343+
EnumSet<CreateFlag> flags, Progressable progress, LocatedBlock lastBlock,
344344
HdfsFileStatus stat, DataChecksum checksum, String[] favoredNodes)
345345
throws IOException {
346346
this(dfsClient, src, flags, progress, stat, checksum);
@@ -352,18 +352,18 @@ private DFSOutputStream(DFSClient dfsClient, String src,
352352
this.fileEncryptionInfo = stat.getFileEncryptionInfo();
353353

354354
// The last partial block of the file has to be filled.
355-
if (!toNewBlock && userAssignmentLastBlock != null) {
355+
if (!toNewBlock && lastBlock != null) {
356356
// indicate that we are appending to an existing block
357-
streamer = new DataStreamer(userAssignmentLastBlock, stat, dfsClient, src, progress,
357+
streamer = new DataStreamer(lastBlock, stat, dfsClient, src, progress,
358358
checksum, cachingStrategy, byteArrayManager);
359-
getStreamer().setBytesCurBlock(userAssignmentLastBlock.getBlockSize());
360-
adjustPacketChunkSize(userAssignmentLastBlock);
361-
getStreamer().setPipelineInConstruction(userAssignmentLastBlock);
359+
getStreamer().setBytesCurBlock(lastBlock.getBlockSize());
360+
adjustPacketChunkSize(lastBlock);
361+
getStreamer().setPipelineInConstruction(lastBlock);
362362
} else {
363363
computePacketChunkSize(dfsClient.getConf().getWritePacketSize(),
364364
bytesPerChecksum);
365365
streamer = new DataStreamer(stat,
366-
userAssignmentLastBlock != null ? userAssignmentLastBlock.getBlock() : null, dfsClient, src,
366+
lastBlock != null ? lastBlock.getBlock() : null, dfsClient, src,
367367
progress, checksum, cachingStrategy, byteArrayManager, favoredNodes,
368368
addBlockFlags);
369369
}

0 commit comments

Comments
 (0)