You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "bbeaudreault (via GitHub)" <gi...@apache.org> on 2023/02/14 16:45:23 UTC

[GitHub] [hadoop] bbeaudreault commented on a diff in pull request #4215: HADOOP-18215. Enhance WritableName to be able to return aliases for classes that use serializers

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


##########
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:
   I was thinking this would be a safe change from a compatibility perspective. People probably shouldn't have code calling this with writables, since it would just fail. I would think the inverse (throwing a new exception) would be more problematic. Is there a documented compatibility guideline for Hadoop?
   
   But yea I can do that if you think it's necessary, just might be nicer without. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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