Package org.apache.hadoop.io
Class WritableName
java.lang.Object
org.apache.hadoop.io.WritableName
Utility to permit renaming of Writable implementation classes without
invalidiating files that contain their class name.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd an alternate name for a class.static Class<?>getClass(String name, Configuration conf) Return the class for a name.static StringReturn the name for a class.static voidSet the name that a class should be known as to something other than the class name.
-
Method Details
-
setName
Set the name that a class should be known as to something other than the class name.- Parameters:
writableClass- input writableClass.name- input name.
-
addName
Add an alternate name for a class.- Parameters:
writableClass- input writableClass.name- input name.
-
getName
Return the name for a class. Default isClass.getName().- Parameters:
writableClass- input writableClass.- Returns:
- name for a class.
-
getClass
Return the class for a name. Default isClass.forName(String).- Parameters:
name- input name.conf- input configuration.- Returns:
- class for a name.
- Throws:
IOException- raised on errors performing I/O.
-