Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.4.0
-
None
-
None
Description
I have a couple of comments on HADOOP-375. Sorry missed that discussion when the patch was under construction.
1) As it is done now infoPort is a member of two classes DatanodeInfo and DatanodeRegistration, which in fact have a
common base DatanodeID. It seems more logical to place infoPort into DatanodeID. This will let us handle the port
assignments inside the constructors rather than outside, and will prevent from unsafe "dynamic casts" like the one
found in FSNamesystem.gotHeartbeat( DatanodeID nodeID, ... )
nodeinfo.infoPort = ((DatanodeRegistration)nodeID).infoPort;
2) Also, should we make infoPort short rather than integer?
Since it is a part of a heartbeat message we might want keeping it small.
3) Member getters should start with get<MemberName>
- public int infoPort()
{ return infoPort; }
+ public int getInfoPort() { return infoPort; }
Attachments
Attachments
Issue Links
- is part of
-
HADOOP-396 Writable DatanodeID
- Closed