[ http://issues.apache.org/jira/browse/HADOOP-414?page=comments#action_12432969 ] Doug Cutting commented on HADOOP-414: -------------------------------------
Perhaps we should add a new abstract base class: public abstract class ImplicitVersionedWritable implements Writable { public abstract readFields(DataInputStream in, int version); public abstract int currentVersion(); public readFields(DataInputStream in) { readFields(in, currentVersion()); } } Then change DatanodeID to extend this: public class DatanodeID implements WritableComparable extends ImplicitVersionedWritable { public int currentVersion() { return FSConstants.DFS_CURRENT_VERSION; } public void readFields(DataInputStream in, int version) { if (version >= -3) { name = UTF8.readString(); ... } else { name = Text.readString(); ... } } Would that work? > replace class UTF8 with class Text > ---------------------------------- > > Key: HADOOP-414 > URL: http://issues.apache.org/jira/browse/HADOOP-414 > Project: Hadoop > Issue Type: Improvement > Affects Versions: 0.5.0 > Reporter: Hairong Kuang > Assigned To: Hairong Kuang > Fix For: 0.6.0 > > Attachments: utf2text.patch > > > Since class UTF8 is deprecated, all references of UTF8 in hadoop should be > replaced with class Text if the change does not break the system. -- 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