From 7587f97127d0cde21c39e98b7a33b60195112dc3 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Mon, 18 Feb 2019 17:55:43 -0800 Subject: [PATCH] HDFS-14296. Prefer ArrayList over LinkedList in VolumeScanner. Contributed by BELUGA BEHR. --- .../org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java index 34552d29411..3bdb1d7158a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java @@ -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 blockIters = - new LinkedList(); + new ArrayList(); /** * Blocks which are suspect.