HDFS-7780. Update use of Iterator to Iterable in DataXceiverServer and SnapshotDiffInfo. Contributed by Ray Chiang.
This commit is contained in:
parent
409113d8f9
commit
6dc8812a95
@ -647,6 +647,9 @@ Release 2.7.0 - UNRELEASED
|
||||
HDFS-7795. Show warning if not all favored nodes were chosen by namenode
|
||||
(kihwal)
|
||||
|
||||
HDFS-7780. Update use of Iterator to Iterable in DataXceiverServer and
|
||||
SnapshotDiffInfo. (Ray Chiang via aajisaka)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-7454. Reduce memory footprint for AclEntries in NameNode.
|
||||
|
@ -252,9 +252,9 @@ public synchronized void sendOOBToPeers() {
|
||||
// be set true before calling this method.
|
||||
synchronized void restartNotifyPeers() {
|
||||
assert (datanode.shouldRun == true && datanode.shutdownForUpgrade);
|
||||
for (Peer p : peers.keySet()) {
|
||||
for (Thread t : peers.values()) {
|
||||
// interrupt each and every DataXceiver thread.
|
||||
peers.get(p).interrupt();
|
||||
t.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,12 +187,13 @@ boolean isFromEarlier() {
|
||||
*/
|
||||
public SnapshotDiffReport generateReport() {
|
||||
List<DiffReportEntry> diffReportList = new ArrayList<DiffReportEntry>();
|
||||
for (INode node : diffMap.keySet()) {
|
||||
diffReportList.add(new DiffReportEntry(DiffType.MODIFY, diffMap
|
||||
.get(node), null));
|
||||
for (Map.Entry<INode,byte[][]> drEntry : diffMap.entrySet()) {
|
||||
INode node = drEntry.getKey();
|
||||
byte[][] path = drEntry.getValue();
|
||||
diffReportList.add(new DiffReportEntry(DiffType.MODIFY, path, null));
|
||||
if (node.isDirectory()) {
|
||||
List<DiffReportEntry> subList = generateReport(dirDiffMap.get(node),
|
||||
diffMap.get(node), isFromEarlier(), renameMap);
|
||||
path, isFromEarlier(), renameMap);
|
||||
diffReportList.addAll(subList);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user