Skip to content
Snippets Groups Projects
Commit 37964863 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #805 from woggle/hadoop-rdd-jobconf

Use new Configuration() instead of slower new JobConf() in SerializableWritable
parents ff9ebfab 6402b539
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ import java.io._ ...@@ -21,7 +21,7 @@ import java.io._
import org.apache.hadoop.io.ObjectWritable import org.apache.hadoop.io.ObjectWritable
import org.apache.hadoop.io.Writable import org.apache.hadoop.io.Writable
import org.apache.hadoop.mapred.JobConf import org.apache.hadoop.conf.Configuration
class SerializableWritable[T <: Writable](@transient var t: T) extends Serializable { class SerializableWritable[T <: Writable](@transient var t: T) extends Serializable {
def value = t def value = t
...@@ -35,7 +35,7 @@ class SerializableWritable[T <: Writable](@transient var t: T) extends Serializa ...@@ -35,7 +35,7 @@ class SerializableWritable[T <: Writable](@transient var t: T) extends Serializa
private def readObject(in: ObjectInputStream) { private def readObject(in: ObjectInputStream) {
in.defaultReadObject() in.defaultReadObject()
val ow = new ObjectWritable() val ow = new ObjectWritable()
ow.setConf(new JobConf()) ow.setConf(new Configuration())
ow.readFields(in) ow.readFields(in)
t = ow.get().asInstanceOf[T] t = ow.get().asInstanceOf[T]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment