SPARK-627 kryo thread safe serialize

However, this is only a temporary solution; should carefully consider how to deal with this problem should be