spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aureliano Buendia <>
Subject Turning kryo on does not decrease binary output
Date Fri, 03 Jan 2014 16:48:40 GMT

I'm trying to call saveAsObjectFile() on an RDD[*(Int, Int, Double Double)*],
expecting the output binary to be smaller, but it is exactly the same size
of when kryo is not on.

I've checked the log, and there is no trace of kryo related errors.

The code looks something like:

class MyRegistrator extends KryoRegistrator {
  override def registerClasses(kryo: Kryo) {
    kryo.register(classOf[*(Int, Int, Double Double)*])
System.setProperty("spark.kryo.registrator", "MyRegistrator")

At the end, I tried to call:


to make sure my class gets registered. But I found errors like:

Exception in thread "DAGScheduler" com.esotericsoftware.kryo.KryoException:
java.lang.IllegalArgumentException: Class is not registered:
Note: To register this class use:

It appears many scala internal types have to be registered in order to have
full kryo support.

Any idea why my simple tuple type should not get kryo benefits?

View raw message