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;
}

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 added a comment - 24/Apr/08 01:35 AM
3283_20080423c.patch: preview, it does not pass the tests yet.

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.

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.

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

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

Hudson added a comment - 26/Apr/08 12:17 PM

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