HDFS-14296. Prefer ArrayList over LinkedList in VolumeScanner. Contributed by BELUGA BEHR.

This commit is contained in:
Inigo Goiri 2019-02-18 17:55:43 -08:00
parent 1de25d134f
commit 7587f97127
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ package org.apache.hadoop.hdfs.server.datanode;
import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@ -125,7 +125,7 @@ public class VolumeScanner extends Thread {
* Each block pool has its own BlockIterator.
*/
private final List<BlockIterator> blockIters =
new LinkedList<BlockIterator>();
new ArrayList<BlockIterator>();
/**
* Blocks which are suspect.