HDFS-3202. NamespaceInfo PB translation drops build version. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1309957 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a981de558
commit
d13cb8a1d4
|
@ -317,6 +317,8 @@ Release 2.0.0 - UNRELEASED
|
|||
|
||||
HDFS-3199. TestValidateConfigurationSettings is failing. (todd via eli)
|
||||
|
||||
HDFS-3202. NamespaceInfo PB translation drops build version. (atm)
|
||||
|
||||
BREAKDOWN OF HDFS-1623 SUBTASKS
|
||||
|
||||
HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd)
|
||||
|
|
|
@ -384,7 +384,8 @@ public class PBHelper {
|
|||
public static NamespaceInfo convert(NamespaceInfoProto info) {
|
||||
StorageInfoProto storage = info.getStorageInfo();
|
||||
return new NamespaceInfo(storage.getNamespceID(), storage.getClusterID(),
|
||||
info.getBlockPoolID(), storage.getCTime(), info.getDistUpgradeVersion());
|
||||
info.getBlockPoolID(), storage.getCTime(), info.getDistUpgradeVersion(),
|
||||
info.getBuildVersion());
|
||||
}
|
||||
|
||||
public static NamenodeCommand convert(NamenodeCommandProto cmd) {
|
||||
|
|
|
@ -52,13 +52,18 @@ public class NamespaceInfo extends StorageInfo {
|
|||
}
|
||||
|
||||
public NamespaceInfo(int nsID, String clusterID, String bpID,
|
||||
long cT, int duVersion) {
|
||||
long cT, int duVersion, String buildVersion) {
|
||||
super(HdfsConstants.LAYOUT_VERSION, nsID, clusterID, cT);
|
||||
blockPoolID = bpID;
|
||||
buildVersion = Storage.getBuildVersion();
|
||||
this.buildVersion = buildVersion;
|
||||
this.distributedUpgradeVersion = duVersion;
|
||||
}
|
||||
|
||||
public NamespaceInfo(int nsID, String clusterID, String bpID,
|
||||
long cT, int duVersion) {
|
||||
this(nsID, clusterID, bpID, cT, duVersion, Storage.getBuildVersion());
|
||||
}
|
||||
|
||||
public String getBuildVersion() {
|
||||
return buildVersion;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue