Issue Details (XML | Word | Printable)

Key: HADOOP-3283
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tsz Wo (Nicholas), SZE
Reporter: Tsz Wo (Nicholas), SZE
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Need a mechanism for data nodes to update generation stamps.

Created: 18/Apr/08 11:22 PM   Updated: 22/Aug/08 07:50 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 3283_20080423c.patch 2008-04-24 01:35 AM Tsz Wo (Nicholas), SZE 23 kB
Text File Licensed for inclusion in ASF works 3283_20080424.patch 2008-04-24 11:30 PM Tsz Wo (Nicholas), SZE 28 kB
Text File Licensed for inclusion in ASF works 3283_20080425versionID.patch 2008-04-25 09:19 PM Tsz Wo (Nicholas), SZE 2 kB
Issue Links:
Dependants
 
Reference
 

Hadoop Flags: Reviewed, Incompatible change
Release Note:
Added an IPC server in DataNode and a new IPC protocol InterDatanodeProtocol. Added conf properties dfs.datanode.ipc.address and dfs.datanode.handler.count with defaults "0.0.0.0:50020" and 3, respectively.
Changed the serialization in DatanodeRegistration and DatanodeInfo, and therefore, updated the versionID in ClientProtocol, DatanodeProtocol, NamenodeProtocol.
Resolution Date: 25/Apr/08 09:31 PM


 Description  « Hide
For implementing file append feature (HADOOP-1700), a generation stamp is added to each block. We need a mechanism for data nodes to update generation stamps for lease recovery.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tsz Wo (Nicholas), SZE added a comment - 19/Apr/08 12:37 AM
One way is to an inter-DataNode protocol for block manipulation:
interface BlockProtocol extends VersionedProtocol {
  /**
   * Update the GenerationStamp of a block.
   * @return true iff update was required and done successfully. 
   */
  public boolean updateGenerationStamp(Block block,
      GenerationStamp generationstamp) throws IOException;

  /**
   * @return the BlockMetaDataInfo of the block. 
   */
  public BlockMetaDataInfo getBlockMetaDataInfo(Block block) throws IOException;
}

Tsz Wo (Nicholas), SZE made changes - 19/Apr/08 12:50 AM
Field Original Value New Value
Link This issue blocks HADOOP-1700 [ HADOOP-1700 ]
dhruba borthakur added a comment - 21/Apr/08 08:43 PM
+1.

dhruba borthakur added a comment - 21/Apr/08 08:44 PM
Maybe we can call it InterDatanodeProtocol to make it more explicit.

Tsz Wo (Nicholas), SZE added a comment - 23/Apr/08 11:12 PM
For adding a Datanode RPC server, we need to store the RPC server port and distribute it. One way is to store the port in DatanodeID. I am not sure whether it is the right way to go.

Tsz Wo (Nicholas), SZE made changes - 23/Apr/08 11:12 PM
Assignee Tsz Wo (Nicholas), SZE [ szetszwo ]
Tsz Wo (Nicholas), SZE added a comment - 24/Apr/08 01:35 AM
3283_20080423c.patch: preview, it does not pass the tests yet.

Tsz Wo (Nicholas), SZE made changes - 24/Apr/08 01:35 AM
Attachment 3283_20080423c.patch [ 12380811 ]
dhruba borthakur added a comment - 24/Apr/08 05:49 AM
1. The two new methods in the InterDatanodeProtocol should take a Block object as the first parameter.
2. The MiniDFSCluster should have a method named getDatanode.getDataNode() that returns an object of type InterDatanodeProtocol. This will allow tests to easily invoke RPCs in the InterDatanodeProtocol.

Tsz Wo (Nicholas), SZE added a comment - 24/Apr/08 11:30 PM
3283_20080424.patch: fixed the bugs and update the patch with Dhruba's comments.

Tsz Wo (Nicholas), SZE made changes - 24/Apr/08 11:30 PM
Attachment 3283_20080424.patch [ 12380882 ]
Tsz Wo (Nicholas), SZE made changes - 24/Apr/08 11:31 PM
Status Open [ 1 ] Patch Available [ 10002 ]
Hadoop QA added a comment - 25/Apr/08 02:01 AM
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12380882/3283_20080424.patch
against trunk revision 645773.

@author +1. The patch does not contain any @author tags.

tests included +1. The patch appears to include 15 new or modified tests.

javadoc +1. The javadoc tool did not generate any warning messages.

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

findbugs -1. The patch appears to introduce 1 new Findbugs warnings.

core tests +1. The patch passed core unit tests.

contrib tests +1. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2320/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2320/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2320/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2320/console

This message is automatically generated.


Tsz Wo (Nicholas), SZE added a comment - 25/Apr/08 08:26 PM
The new Findbugs warning says that class doesn't override equals in the superclass. In our case, we have BlockMetaDataInfo extending Block and we don't need to define equals in BlockMetaDataInfo.

dhruba borthakur made changes - 25/Apr/08 09:02 PM
Hadoop Flags [Incompatible change, Reviewed]
Repository Revision Date User Message
ASF #651699 Fri Apr 25 21:05:01 UTC 2008 dhruba HADOOP-3283. The Datanode has a RPC server. It currently supports
two RPCs: the first RPC retrives the metadata about a block and the
second RPC sets the generation stamp of an existing block.
(Tsz Wo (Nicholas), SZE via dhruba)
Files Changed
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
MODIFY /hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestHost2NodesMap.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeID.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeRegistration.java
ADD /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/BlockMetaDataInfo.java
MODIFY /hadoop/core/trunk/src/test/org/apache/hadoop/net/TestNetworkTopology.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DataBlockScanner.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeInfo.java
ADD /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/InterDatanodeProtocol.java
MODIFY /hadoop/core/trunk/CHANGES.txt
ADD /hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestInterDatanodeProtocol.java
MODIFY /hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestReplicationPolicy.java
MODIFY /hadoop/core/trunk/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java
MODIFY /hadoop/core/trunk/conf/hadoop-default.xml

Tsz Wo (Nicholas), SZE added a comment - 25/Apr/08 09:19 PM
3283_20080425versionID.patch: update the versionID in ClientProtocol, DatanodeProtocol, NamenodeProtocol

Tsz Wo (Nicholas), SZE made changes - 25/Apr/08 09:19 PM
Attachment 3283_20080425versionID.patch [ 12380969 ]
Tsz Wo (Nicholas), SZE made changes - 25/Apr/08 09:26 PM
Release Note Incompatible changes:
- Added an IPC server in DataNode and a new IPC protocol InterDatanodeProtocol. Added conf properties dfs.datanode.ipc.address and dfs.datanode.handler.count with defaults "0.0.0.0:50020" and 3, respectively.
- Changed the serialization in DatanodeRegistration and DatanodeInfo, and therefore, updated the versionID in ClientProtocol, DatanodeProtocol, NamenodeProtocol.
Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
Repository Revision Date User Message
ASF #651703 Fri Apr 25 21:29:17 UTC 2008 dhruba HADOOP-3283. The Datanode has a RPC server. It currently supports
two RPCs: the first RPC retrives the metadata about a block and the
second RPC sets the generation stamp of an existing block.
(Tsz Wo (Nicholas), SZE via dhruba)
Files Changed
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeProtocol.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeProtocol.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java

dhruba borthakur added a comment - 25/Apr/08 09:31 PM
I just committed this. Thanks Nicholas!

dhruba borthakur made changes - 25/Apr/08 09:31 PM
Resolution Fixed [ 1 ]
Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
Status Patch Available [ 10002 ] Resolved [ 5 ]
Tsz Wo (Nicholas), SZE made changes - 25/Apr/08 10:03 PM
Link This issue is related to HADOOP-3316 [ HADOOP-3316 ]
Hudson added a comment - 26/Apr/08 12:17 PM

Repository Revision Date User Message
ASF #653264 Sun May 04 19:29:04 UTC 2008 rangadi HADOOP-3337. Loading FSEditLog was broken by HADOOP-3283 since it
changed Writable serialization of DatanodeInfo. This patch handles it.
(Tsz Wo (Nicholas), SZE via rangadi)
Files Changed
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeDescriptor.java
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/DatanodeInfo.java
MODIFY /hadoop/core/trunk/CHANGES.txt
MODIFY /hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSEditLog.java

Hudson added a comment - 07/May/08 12:22 PM

Nigel Daley made changes - 09/May/08 10:28 PM
Fix Version/s 0.18.0 [ 12312972 ]
Robert Chansler made changes - 30/Jun/08 09:49 PM
Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
Release Note Incompatible changes:
- Added an IPC server in DataNode and a new IPC protocol InterDatanodeProtocol. Added conf properties dfs.datanode.ipc.address and dfs.datanode.handler.count with defaults "0.0.0.0:50020" and 3, respectively.
- Changed the serialization in DatanodeRegistration and DatanodeInfo, and therefore, updated the versionID in ClientProtocol, DatanodeProtocol, NamenodeProtocol.
Added an IPC server in DataNode and a new IPC protocol InterDatanodeProtocol. Added conf properties dfs.datanode.ipc.address and dfs.datanode.handler.count with defaults "0.0.0.0:50020" and 3, respectively.
Changed the serialization in DatanodeRegistration and DatanodeInfo, and therefore, updated the versionID in ClientProtocol, DatanodeProtocol, NamenodeProtocol.
Nigel Daley made changes - 22/Aug/08 07:50 PM
Status Resolved [ 5 ] Closed [ 6 ]