HDFS-7217. Better batching of IBRs. Contributed by Kihwal Lee.
This commit is contained in:
parent
8d7c54967d
commit
db71bb54bc
@ -660,6 +660,8 @@ Release 2.6.0 - UNRELEASED
|
|||||||
|
|
||||||
HDFS-7169. Add SE_BAD_FIELD to findbugsExcludeFile.xml. (szetszwo)
|
HDFS-7169. Add SE_BAD_FIELD to findbugsExcludeFile.xml. (szetszwo)
|
||||||
|
|
||||||
|
HDFS-7217. Better batching of IBRs. (kihwal)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-6690. Deduplicate xattr names in memory. (wang)
|
HDFS-6690. Deduplicate xattr names in memory. (wang)
|
||||||
|
@ -236,7 +236,7 @@ void notifyNamenodeReceivedBlock(
|
|||||||
delHint);
|
delHint);
|
||||||
|
|
||||||
for (BPServiceActor actor : bpServices) {
|
for (BPServiceActor actor : bpServices) {
|
||||||
actor.notifyNamenodeBlockImmediately(bInfo, storageUuid);
|
actor.notifyNamenodeBlock(bInfo, storageUuid, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ void notifyNamenodeReceivingBlock(ExtendedBlock block, String storageUuid) {
|
|||||||
block.getLocalBlock(), BlockStatus.RECEIVING_BLOCK, null);
|
block.getLocalBlock(), BlockStatus.RECEIVING_BLOCK, null);
|
||||||
|
|
||||||
for (BPServiceActor actor : bpServices) {
|
for (BPServiceActor actor : bpServices) {
|
||||||
actor.notifyNamenodeBlockImmediately(bInfo, storageUuid);
|
actor.notifyNamenodeBlock(bInfo, storageUuid, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,13 +368,17 @@ void addPendingReplicationBlockInfo(ReceivedDeletedBlockInfo bInfo,
|
|||||||
* till namenode is informed before responding with success to the
|
* till namenode is informed before responding with success to the
|
||||||
* client? For now we don't.
|
* client? For now we don't.
|
||||||
*/
|
*/
|
||||||
void notifyNamenodeBlockImmediately(
|
void notifyNamenodeBlock(ReceivedDeletedBlockInfo bInfo,
|
||||||
ReceivedDeletedBlockInfo bInfo, String storageUuid) {
|
String storageUuid, boolean now) {
|
||||||
synchronized (pendingIncrementalBRperStorage) {
|
synchronized (pendingIncrementalBRperStorage) {
|
||||||
addPendingReplicationBlockInfo(
|
addPendingReplicationBlockInfo(
|
||||||
bInfo, dn.getFSDataset().getStorage(storageUuid));
|
bInfo, dn.getFSDataset().getStorage(storageUuid));
|
||||||
sendImmediateIBR = true;
|
sendImmediateIBR = true;
|
||||||
pendingIncrementalBRperStorage.notifyAll();
|
// If now is true, the report is sent right away.
|
||||||
|
// Otherwise, it will be sent out in the next heartbeat.
|
||||||
|
if (now) {
|
||||||
|
pendingIncrementalBRperStorage.notifyAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ private static Block getDummyBlock() {
|
|||||||
private void injectBlockReceived() {
|
private void injectBlockReceived() {
|
||||||
ReceivedDeletedBlockInfo rdbi = new ReceivedDeletedBlockInfo(
|
ReceivedDeletedBlockInfo rdbi = new ReceivedDeletedBlockInfo(
|
||||||
getDummyBlock(), BlockStatus.RECEIVED_BLOCK, null);
|
getDummyBlock(), BlockStatus.RECEIVED_BLOCK, null);
|
||||||
actor.notifyNamenodeBlockImmediately(rdbi, storageUuid);
|
actor.notifyNamenodeBlock(rdbi, storageUuid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user