hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r707258 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/io/serializer/SerializationFactory.java
Date Thu, 23 Oct 2008 03:46:32 GMT
Author: acmurthy
Date: Wed Oct 22 20:46:31 2008
New Revision: 707258

URL: http://svn.apache.org/viewvc?rev=707258&view=rev
Log:
HADOOP-4467. SerializationFactory now uses the current context ClassLoader allowing for user
supplied Serialization instances. Contributed by Chris Wensel.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/core/org/apache/hadoop/io/serializer/SerializationFactory.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=707258&r1=707257&r2=707258&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Oct 22 20:46:31 2008
@@ -1052,6 +1052,10 @@
     HADOOP-3914. DFSClient sends Checksum Ok only once for a block. 
     (Christain Kunz via hairong)
  
+    HADOOP-4467. SerializationFactory now uses the current context ClassLoader
+    allowing for user supplied Serialization instances. (Chris Wensel via
+    acmurthy)
+ 
 Release 0.18.1 - 2008-09-17
 
   IMPROVEMENTS

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/io/serializer/SerializationFactory.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/io/serializer/SerializationFactory.java?rev=707258&r1=707257&r2=707258&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/io/serializer/SerializationFactory.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/io/serializer/SerializationFactory.java Wed
Oct 22 20:46:31 2008
@@ -51,16 +51,16 @@
     super(conf);
     for (String serializerName : conf.getStrings("io.serializations", 
       new String[]{"org.apache.hadoop.io.serializer.WritableSerialization"})) {
-      add(serializerName);
+      add(conf, serializerName);
     }
   }
   
   @SuppressWarnings("unchecked")
-  private void add(String serializationName) {
+  private void add(Configuration conf, String serializationName) {
     try {
       
       Class<? extends Serialization> serializionClass =
-        (Class<? extends Serialization>) Class.forName(serializationName);
+        (Class<? extends Serialization>) conf.getClassByName(serializationName);
       serializations.add((Serialization)
           ReflectionUtils.newInstance(serializionClass, getConf()));
     } catch (ClassNotFoundException e) {



Mime
View raw message