You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Konstantin Shvachko (JIRA)" <ji...@apache.org> on 2006/06/23 03:09:29 UTC
[jira] Created: (HADOOP-321) DatanodeInfo refactoring
DatanodeInfo refactoring
------------------------
Key: HADOOP-321
URL: http://issues.apache.org/jira/browse/HADOOP-321
Project: Hadoop
Type: Improvement
Components: dfs
Reporter: Konstantin Shvachko
I'm trying to refactor some name node classes, which seem to be similar.
So DatanodeInfo is a public api now for purely external ( to name node) use.
The name node class that stores information about data nodes including the
set of its blocks is called DatanodeDescriptor.
The DatanodeReport is removed since it was a variation of DatanodeInfo.
Previously DatanodeInfo and DatanodeDescriptor were the same class, and
DatanodeReport was used for reporting node statistics only.
This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: (was: DatanodeInfo_refactor.patch)
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Owen O'Malley updated HADOOP-321:
---------------------------------
Attachment: DatanodeInfo_refactor5.patch
I've trivially updated Konstantin's patch to make it apply to the current sources.
I'm still not wild about having the DataNodeInfo send part of itself via RPC or being Comparable. There is a lot of confusion still about what should be a DatanodeInfo versus a DatanodeID, but that was present in the original code, not the patch and indicates additional refactorings that are needed.
I ran both the unit tests and a distributed test and it was all good.
This patch gets rid of some of the redundant code and that is a good thing. I also like the comments saying what the types of the elements in the containers are. I'm looking forward to when we can declare all of the container types. *smile*
A few comments:
1. A bunch of the routines have empty javadoc, which isn't useful at all. Although I suspect those routines were just moved from somewhere else, it makes the patch look bad.
2. Namenode.sendHeartbeat creates a throwaway DatanodeDescriptor, including its block set, just to do a lookup on the name. Is there a way to index that table on the DatanodeID instead?
3. DatanodeID implements compareTo, but not equals or hashCode. Usually it is a good idea to define all of them.
4. Why isn't DatanodeID implementing Writable?
5. To write out strings, you don't need to create UTF8 from them, you just need to do:
UTF8.writeString(out, name);
UTF8.writeString(out, storageId);
and reading looks like:
name = UTF8.readString(in);
storageId = UTF8.readString(in);
It works either way, it is just a little easier to read the code with the helper functions.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Issue Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assigned To: Konstantin Shvachko
> Fix For: 0.5.0
>
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4-comp.patch, DatanodeInfo_refactor4.patch, DatanodeInfo_refactor5.patch
>
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor.patch
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor3.patch
Sorry for submitting a bad path. I'm attaching the correct one.
It look like we have completely different views with Owen on how the inheritance should be used in OOP.
In this particular case the derived class DatanodeDescriptor is intended to inherit and reuse all members
of DatanodeInfo except for the Writable interface (2 methods). So the inheritance seems quite logical to me.
Saves a lot of source code too.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.4.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor.patch
I've updated the patch.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12418366 ]
Konstantin Shvachko commented on HADOOP-321:
--------------------------------------------
In fact DatanodeDescriptor needs everything that it inherits from DatanodeInfo
even the Writable.read() and Writable.write().
The last two are going to be used for logging and check pointing of DatanodeDescriptor-s.
What is not used in DatanodeDescriptor is the Writable factory, because descriptors are not
meant to be used in RPC communications. That is why the factory is defined for DatanodeInfo
but not for the descriptor class.
So if we go the composition way we will particularly need to implement Writable for
DatanodeDescriptor, the only purpose of which would be to call the DatanodeInfo Writable methods.
Why? With inheritance it is already there. And the same applies to all other methods.
A few words about the bug that caused this discussion.
I did not realize that RPC sends classes based on the actual object instances rather than on the type declarations.
So DatanodeDescriptor was sent even though the variable was declared as DatanodeInfo.
The receiving side then was not able to instantiate the received DatanodeDescriptor class because the factory is
not defined for it. DatanodeInfo was expected to be received.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor.patch
DatanodeDescriptor should not be public.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12418380 ]
Owen O'Malley commented on HADOOP-321:
--------------------------------------
DatanodeDescriptor may in the future be Writable, but the current version in your patch is not. It doesn't implement readFields or write and just inherits the ones from DatanodeInfo, which will ignore the TreeMap in the DatanodeDescriptor.
In my experience, using inheritance for implementation is extremely brittle. It leads to confusing code that is easy to break. This has been born out both by this bad patch and Milind's very reasonable attempt to fix it that was incorrect because of this design idiom. Another instance when it caused trouble was having the FSNameSystem.FileUnderConstruction inherit from Vector. It was fine, until I tried to make changes to it and the code broke in strange ways. Obviously it can work, I just think create problematic code.
I think that composition is a much better idiom for doing this kind of stuff.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Doug Cutting updated HADOOP-321:
--------------------------------
Fix Version: 0.5.0
(was: 0.4.0)
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (HADOOP-321) DatanodeInfo refactoring
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Doug Cutting resolved HADOOP-321:
---------------------------------
Fix Version: 0.4.0
Resolution: Fixed
I just committed this. Thanks, Konstantin.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Fix For: 0.4.0
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: (was: DatanodeInfo_refactor.patch)
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor.patch
DatanodeInfo.lastUpdate() is deprecated.
DatanodeInfo.getLastUpdate() should be the name.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor4-comp.patch
It took me a while to implement the composition approach.
But here it is. What I don't like about it is:
a) the patch is bigger (41K vs 54), and it's not just more changes
b) it's also the performance, I have to use 2 function calls instead of one,
whenever a member is accessed, but copying arrays just to obtain the inner
classes is what makes me really sad.
The latter can be avoided but will require even more changes.
I think it's not reasonable to spend more time on this issue.
Both versions are fully functional, let's pick one and move on.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4-comp.patch, DatanodeInfo_refactor4.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12418390 ]
Konstantin Shvachko commented on HADOOP-321:
--------------------------------------------
If class A is supposed to work with each and every method of class B is it the reason to derive A from B or not?
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12417893 ]
Doug Cutting commented on HADOOP-321:
-------------------------------------
I like this. However we cannot simply remove DataNodeReport, since it's public, and may be referenced by user code. Rather, we should change it to a deprecated subclass of DatanodeInfo that defines no methods, and file a bug to remove it from the next release. Also, DatanodeInfo subclasses the non-public DatanodeID, so that class should probably be made public too.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12418168 ]
Owen O'Malley commented on HADOOP-321:
--------------------------------------
This is the patch that broke the system. Having looked at this code, I don't like the use of inheritance between DatanodeInfo and DatanodeDescriptor. I think that composition is a _much_ better approach. They are _not_ logically the sub/super-type of each other. In particular, DatanodeInfo is intended to be Writable and DatanodeDescriptor is intended NOT to be Writable. Making them inherit from each other not only broke the system, it is a really problematic design.
In any case, if you take svn head and revert this patch using:
patch -p0 -R < DatanodeRefactor.patch
you'll have a working system again.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Fix For: 0.4.0
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12423545 ]
Owen O'Malley commented on HADOOP-321:
--------------------------------------
I'm +1 for commiting this before it goes stale again.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Issue Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assigned To: Konstantin Shvachko
> Fix For: 0.5.0
>
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4-comp.patch, DatanodeInfo_refactor4.patch, DatanodeInfo_refactor5.patch
>
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HADOOP-321) DatanodeInfo refactoring
Posted by "eric baldeschwieler (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=comments#action_12418345 ]
eric baldeschwieler commented on HADOOP-321:
--------------------------------------------
If you are saying you think an object should inherit methods that don't work, I'm not happy with the idea. Saving lines of code isn't a good enough reason to do this.
Maybe you need to refactor the base class if what you are trying to do does make sense.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: DatanodeInfo_refactor4.patch
This one is updated in synch with the last release.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.5.0
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Reopened: (HADOOP-321) DatanodeInfo refactoring
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Doug Cutting reopened HADOOP-321:
---------------------------------
Assign To: Konstantin Shvachko
I reverted this.
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assignee: Konstantin Shvachko
> Fix For: 0.4.0
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (HADOOP-321) DatanodeInfo refactoring
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Konstantin Shvachko updated HADOOP-321:
---------------------------------------
Attachment: (was: DatanodeInfo_refactor.patch)
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Attachments: DatanodeInfo_refactor.patch
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (HADOOP-321) DatanodeInfo refactoring
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HADOOP-321?page=all ]
Doug Cutting resolved HADOOP-321.
---------------------------------
Resolution: Fixed
I just committed this. Thanks!
> DatanodeInfo refactoring
> ------------------------
>
> Key: HADOOP-321
> URL: http://issues.apache.org/jira/browse/HADOOP-321
> Project: Hadoop
> Issue Type: Improvement
> Components: dfs
> Reporter: Konstantin Shvachko
> Assigned To: Konstantin Shvachko
> Fix For: 0.5.0
>
> Attachments: DatanodeInfo_refactor.patch, DatanodeInfo_refactor3.patch, DatanodeInfo_refactor4-comp.patch, DatanodeInfo_refactor4.patch, DatanodeInfo_refactor5.patch
>
>
> I'm trying to refactor some name node classes, which seem to be similar.
> So DatanodeInfo is a public api now for purely external ( to name node) use.
> The name node class that stores information about data nodes including the
> set of its blocks is called DatanodeDescriptor.
> The DatanodeReport is removed since it was a variation of DatanodeInfo.
> Previously DatanodeInfo and DatanodeDescriptor were the same class, and
> DatanodeReport was used for reporting node statistics only.
> This is a preparation step for HADOOP-306.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira