[ 
https://issues.apache.org/jira/browse/HADOOP-18215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17688781#comment-17688781
 ] 

ASF GitHub Bot commented on HADOOP-18215:
-----------------------------------------

ayushtkn commented on code in PR #4215:
URL: https://github.com/apache/hadoop/pull/4215#discussion_r1106558387


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableName.java:
##########
@@ -92,7 +92,7 @@ public static synchronized Class<?> getClass(String name, 
Configuration conf
                                             ) throws IOException {
     Class<?> writableClass = NAME_TO_CLASS.get(name);
     if (writableClass != null)
-      return writableClass.asSubclass(Writable.class);
+      return writableClass;

Review Comment:
   thx. the method is there since 2009, that is deemed stable :)
   In general there is a line as well in the compat
   ```
   the expectation that an interface should “eventually” stabilize and be 
promoted to Stable
   ```
   but we aren't changing and the hadoop utils I feel are widely used, and 
these annotations just help to dodge the complains from downstream when their 
code breaks, "Your fault, Hadoop never said you can use this"





> Enhance WritableName to be able to return aliases for classes that use 
> serializers
> ----------------------------------------------------------------------------------
>
>                 Key: HADOOP-18215
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18215
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Bryan Beaudreault
>            Assignee: Bryan Beaudreault
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> WritableName allows users shim in aliases for writables, in the case where a 
> SequenceFile was written with a Writable class that has since been renamed or 
> moved to another package. However, this requires that the aliased class 
> extend Writable. 
> Separately it's possible to configure jobs with keys and values which don't 
> actually extend Writable. Instead they are meant to be 
> serialized/deserialized using the serialization classes defined in 
> {{io.serializations}} config.
> Unfortunately, the current implementation does not support these key/value 
> classes. All we need to do to support this is remove the 
> {{.asSubclass(Writable.class)}} as is already the case for the default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to