HDFS-3202. NamespaceInfo PB translation drops build version. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1309955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
85a76eb319
commit
8e739ff01e
@ -419,6 +419,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 static BlockKey[] convertBlockKeys(List<BlockKeyProto> list) {
|
||||
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) {
|
||||
|
@ -50,14 +50,19 @@ public NamespaceInfo() {
|
||||
super();
|
||||
buildVersion = null;
|
||||
}
|
||||
|
||||
public NamespaceInfo(int nsID, String clusterID, String bpID,
|
||||
long cT, int duVersion) {
|
||||
|
||||
public NamespaceInfo(int nsID, String clusterID, String bpID,
|
||||
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
Block a user