hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "He Yongqiang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-5596) Refactor ObjectWritable to support EnumSet
Date Tue, 31 Mar 2009 05:39:50 GMT
Refactor ObjectWritable to support EnumSet

                 Key: HADOOP-5596
                 URL: https://issues.apache.org/jira/browse/HADOOP-5596
             Project: Hadoop Core
          Issue Type: Improvement
            Reporter: He Yongqiang

This is a demand for Hadoop-5438. 
Also another small improvement is that i saw that in the beginning of readObject, it tries
to get the class from PRIMITIVE_NAMES and then conf. Maybe it is better to add a direct load
after them if the delaredClass is still null. Like this:
String className = UTF8.readString(in);
    Class<?> declaredClass = PRIMITIVE_NAMES.get(className);
    if (declaredClass == null) {
      try {
        declaredClass = conf.getClassByName(className);
      } catch (Exception e) {
    if(declaredClass == null) {
      try {
        declaredClass = Class.forName(className);
      } catch (ClassNotFoundException e) {
        throw new RuntimeException("readObject can't find class " + className, e);

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message