HDFS-3138. svn merge -c 1307553 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1307555 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-03-30 17:52:39 +00:00
parent cf5dc702c9
commit aa9e43ef08
3 changed files with 4 additions and 9 deletions

View File

@ -10,6 +10,8 @@ Release 2.0.0 - UNRELEASED
HDFS-3137. Bump LAST_UPGRADABLE_LAYOUT_VERSION to -16. (eli) HDFS-3137. Bump LAST_UPGRADABLE_LAYOUT_VERSION to -16. (eli)
HDFS-3138. Move DatanodeInfo#ipcPort to DatanodeID. (eli)
NEW FEATURES NEW FEATURES
HDFS-2978. The NameNode should expose name dir statuses via JMX. (atm) HDFS-2978. The NameNode should expose name dir statuses via JMX. (atm)

View File

@ -170,7 +170,6 @@ public class DatanodeID implements WritableComparable<DatanodeID> {
name = nodeReg.getName(); name = nodeReg.getName();
infoPort = nodeReg.getInfoPort(); infoPort = nodeReg.getInfoPort();
ipcPort = nodeReg.getIpcPort(); ipcPort = nodeReg.getIpcPort();
// update any more fields added in future.
} }
/** Comparable. /** Comparable.
@ -190,6 +189,7 @@ public class DatanodeID implements WritableComparable<DatanodeID> {
DeprecatedUTF8.writeString(out, name); DeprecatedUTF8.writeString(out, name);
DeprecatedUTF8.writeString(out, storageID); DeprecatedUTF8.writeString(out, storageID);
out.writeShort(infoPort); out.writeShort(infoPort);
out.writeShort(ipcPort);
} }
@Override @Override
@ -201,5 +201,6 @@ public class DatanodeID implements WritableComparable<DatanodeID> {
// So chop off the first two bytes (and hence the signed bits) before // So chop off the first two bytes (and hence the signed bits) before
// setting the field. // setting the field.
this.infoPort = in.readShort() & 0x0000ffff; this.infoPort = in.readShort() & 0x0000ffff;
this.ipcPort = in.readShort() & 0x0000ffff;
} }
} }

View File

@ -380,10 +380,6 @@ public class DatanodeInfo extends DatanodeID implements Node {
@Override @Override
public void write(DataOutput out) throws IOException { public void write(DataOutput out) throws IOException {
super.write(out); super.write(out);
//TODO: move it to DatanodeID once DatanodeID is not stored in FSImage
out.writeShort(ipcPort);
out.writeLong(capacity); out.writeLong(capacity);
out.writeLong(dfsUsed); out.writeLong(dfsUsed);
out.writeLong(remaining); out.writeLong(remaining);
@ -398,10 +394,6 @@ public class DatanodeInfo extends DatanodeID implements Node {
@Override @Override
public void readFields(DataInput in) throws IOException { public void readFields(DataInput in) throws IOException {
super.readFields(in); super.readFields(in);
//TODO: move it to DatanodeID once DatanodeID is not stored in FSImage
this.ipcPort = in.readShort() & 0x0000ffff;
this.capacity = in.readLong(); this.capacity = in.readLong();
this.dfsUsed = in.readLong(); this.dfsUsed = in.readLong();
this.remaining = in.readLong(); this.remaining = in.readLong();