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


##########
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:
   That is what we expect, nobody should be expecting an exception. But this 
method used to throw an exception earlier and we should ensure unless it is a 
bug in the code, or the last option we should let it stay as is. Such changes 
looks safe on hadoop side, but when a downstream project tries to upgrade and 
if it is using such methods, it creates issues and blocks the way for 
them.(Have seen that in the past with Hive/Tez)
   
   So, I would say if we can avoid changing the existing behaviour of a public 
method, we should do as a best effort



-- 
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-unsubscr...@hadoop.apache.org

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


---------------------------------------------------------------------
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