Skip to content

Commit b0b1ef7

Browse files
committed
fix checkstyle warning.
1 parent c7e3950 commit b0b1ef7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockRecoveryWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ long getSafeLength(Map<Long, BlockRecord> syncBlocks) {
553553
private void checkLocations(int locationCount)
554554
throws IOException {
555555
if (locationCount < ecPolicy.getNumDataUnits()) {
556-
throw new IOException(block + " has no enough internal blocks(current:" + locationCount +
556+
throw new IOException(block + " has no enough internal blocks(current: " + locationCount +
557557
"), unable to start recovery. Locations=" + Arrays.asList(locs));
558558
}
559559
}

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecoveryStriped.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ public void testSafeLength() {
267267
*/
268268
@Test
269269
public void testLeaseRecoveryWithManyZeroLengthReplica() {
270-
int cellSize = (int)1024 * 1024;
270+
int curCellSize = (int)1024 * 1024;
271271
try {
272272
final FSDataOutputStream out = dfs.create(p);
273273
final DFSStripedOutputStream stripedOut = (DFSStripedOutputStream) out
274274
.getWrappedStream();
275-
for (int pos = 0; pos < cellSize; pos++) {
275+
for (int pos = 0; pos < curCellSize; pos++) {
276276
out.write(StripedFileTestUtil.getByte(pos));
277277
}
278278
for (int i = 0; i < dataBlocks + parityBlocks; i++) {

0 commit comments

Comments
 (0)