HDFS-5510. Fix a findbug warning in DataStorage.java on HDFS-2832 branch. (Contributed by Junping Du)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-2832@1542006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2013-11-14 18:16:02 +00:00
parent bf9f8511fa
commit ea1c5ea086
2 changed files with 5 additions and 1 deletions

View File

@ -104,3 +104,6 @@ IMPROVEMENTS:
HDFS-5501. Fix pendingReceivedRequests tracking in BPServiceActor. (Arpit
Agarwal)
HDFS-5510. Fix a findbug warning in DataStorage.java on HDFS-2832 branch.
(Junping Du via Arpit Agarwal)

View File

@ -291,9 +291,10 @@ protected void setPropertiesFromFields(Properties props,
props.setProperty("layoutVersion", String.valueOf(layoutVersion));
props.setProperty("storageID", sd.getStorageUuid());
String datanodeUuid = getDatanodeUuid();
if (LayoutVersion.supports(Feature.ADD_DATANODE_AND_STORAGE_UUIDS,
layoutVersion) && datanodeUuid != null) {
props.setProperty("datanodeUuid", getDatanodeUuid());
props.setProperty("datanodeUuid", datanodeUuid);
}
// Set NamespaceID in version before federation