HDFS-4315. DNs with multiple BPs can have BPOfferServices fail to start due to unsynchronized map access. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1422778 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
34f9461d3a
commit
721095474d
|
@ -619,6 +619,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HDFS-4307. SocketCache should use monotonic time. (Colin Patrick McCabe
|
HDFS-4307. SocketCache should use monotonic time. (Colin Patrick McCabe
|
||||||
via atm)
|
via atm)
|
||||||
|
|
||||||
|
HDFS-4315. DNs with multiple BPs can have BPOfferServices fail to start
|
||||||
|
due to unsynchronized map access. (atm)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-3077 SUBTASKS
|
BREAKDOWN OF HDFS-3077 SUBTASKS
|
||||||
|
|
||||||
HDFS-3077. Quorum-based protocol for reading and writing edit logs.
|
HDFS-3077. Quorum-based protocol for reading and writing edit logs.
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.io.RandomAccessFile;
|
||||||
import java.nio.channels.FileLock;
|
import java.nio.channels.FileLock;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -78,7 +79,7 @@ public class DataStorage extends Storage {
|
||||||
|
|
||||||
// BlockPoolStorage is map of <Block pool Id, BlockPoolStorage>
|
// BlockPoolStorage is map of <Block pool Id, BlockPoolStorage>
|
||||||
private Map<String, BlockPoolSliceStorage> bpStorageMap
|
private Map<String, BlockPoolSliceStorage> bpStorageMap
|
||||||
= new HashMap<String, BlockPoolSliceStorage>();
|
= Collections.synchronizedMap(new HashMap<String, BlockPoolSliceStorage>());
|
||||||
|
|
||||||
|
|
||||||
DataStorage() {
|
DataStorage() {
|
||||||
|
|
|
@ -56,7 +56,6 @@ public class TestWebHdfsWithMultipleNameNodes {
|
||||||
((Log4JLogger)NameNode.stateChangeLog).getLogger().setLevel(Level.OFF);
|
((Log4JLogger)NameNode.stateChangeLog).getLogger().setLevel(Level.OFF);
|
||||||
((Log4JLogger)LeaseManager.LOG).getLogger().setLevel(Level.OFF);
|
((Log4JLogger)LeaseManager.LOG).getLogger().setLevel(Level.OFF);
|
||||||
((Log4JLogger)LogFactory.getLog(FSNamesystem.class)).getLogger().setLevel(Level.OFF);
|
((Log4JLogger)LogFactory.getLog(FSNamesystem.class)).getLogger().setLevel(Level.OFF);
|
||||||
((Log4JLogger)DataNode.LOG).getLogger().setLevel(Level.OFF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Configuration conf = new HdfsConfiguration();
|
private static final Configuration conf = new HdfsConfiguration();
|
||||||
|
|
Loading…
Reference in New Issue