HDFS-14296. Prefer ArrayList over LinkedList in VolumeScanner. Contributed by BELUGA BEHR.
This commit is contained in:
parent
1de25d134f
commit
7587f97127
|
@ -21,9 +21,9 @@ package org.apache.hadoop.hdfs.server.datanode;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ public class VolumeScanner extends Thread {
|
||||||
* Each block pool has its own BlockIterator.
|
* Each block pool has its own BlockIterator.
|
||||||
*/
|
*/
|
||||||
private final List<BlockIterator> blockIters =
|
private final List<BlockIterator> blockIters =
|
||||||
new LinkedList<BlockIterator>();
|
new ArrayList<BlockIterator>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocks which are suspect.
|
* Blocks which are suspect.
|
||||||
|
|
Loading…
Reference in New Issue