HDFS-9137. DeadLock between DataNode#refreshVolumes and BPOfferService#registrationSucceeded. (Uma Maheswara Rao G via yliu)
This commit is contained in:
parent
2f4bcdef8c
commit
22ed1471bd
|
@ -1169,6 +1169,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9211. Fix incorrect version in hadoop-hdfs-native-client/pom.xml
|
HDFS-9211. Fix incorrect version in hadoop-hdfs-native-client/pom.xml
|
||||||
from HDFS-9170 branch-2 backport. (Eric Payne via wang)
|
from HDFS-9170 branch-2 backport. (Eric Payne via wang)
|
||||||
|
|
||||||
|
HDFS-9137. DeadLock between DataNode#refreshVolumes and
|
||||||
|
BPOfferService#registrationSucceeded. (Uma Maheswara Rao G via yliu)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -502,12 +502,29 @@ public class DataNode extends ReconfigurableBase
|
||||||
public void reconfigurePropertyImpl(String property, String newVal)
|
public void reconfigurePropertyImpl(String property, String newVal)
|
||||||
throws ReconfigurationException {
|
throws ReconfigurationException {
|
||||||
if (property.equals(DFS_DATANODE_DATA_DIR_KEY)) {
|
if (property.equals(DFS_DATANODE_DATA_DIR_KEY)) {
|
||||||
|
IOException rootException = null;
|
||||||
try {
|
try {
|
||||||
LOG.info("Reconfiguring " + property + " to " + newVal);
|
LOG.info("Reconfiguring " + property + " to " + newVal);
|
||||||
this.refreshVolumes(newVal);
|
this.refreshVolumes(newVal);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ReconfigurationException(property, newVal,
|
rootException = e;
|
||||||
getConf().get(property), e);
|
} finally {
|
||||||
|
// Send a full block report to let NN acknowledge the volume changes.
|
||||||
|
try {
|
||||||
|
triggerBlockReport(
|
||||||
|
new BlockReportOptions.Factory().setIncremental(false).build());
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.warn("Exception while sending the block report after refreshing"
|
||||||
|
+ " volumes " + property + " to " + newVal, e);
|
||||||
|
if (rootException == null) {
|
||||||
|
rootException = e;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (rootException != null) {
|
||||||
|
throw new ReconfigurationException(property, newVal,
|
||||||
|
getConf().get(property), rootException);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new ReconfigurationException(
|
throw new ReconfigurationException(
|
||||||
|
@ -689,10 +706,6 @@ public class DataNode extends ReconfigurableBase
|
||||||
conf.set(DFS_DATANODE_DATA_DIR_KEY,
|
conf.set(DFS_DATANODE_DATA_DIR_KEY,
|
||||||
Joiner.on(",").join(effectiveVolumes));
|
Joiner.on(",").join(effectiveVolumes));
|
||||||
dataDirs = getStorageLocations(conf);
|
dataDirs = getStorageLocations(conf);
|
||||||
|
|
||||||
// Send a full block report to let NN acknowledge the volume changes.
|
|
||||||
triggerBlockReport(new BlockReportOptions.Factory()
|
|
||||||
.setIncremental(false).build());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue