You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/26 07:48:59 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #25470: [SPARK-28751][Core][WIP] Improve java serializer deserialization performance

cloud-fan commented on a change in pull request #25470: [SPARK-28751][Core][WIP] Improve java serializer deserialization performance
URL: https://github.com/apache/spark/pull/25470#discussion_r317488801
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/serializer/JavaSerializer.scala
 ##########
 @@ -92,9 +114,18 @@ private object JavaDeserializationStream {
 }
 
 private[spark] class JavaSerializerInstance(
 
 Review comment:
   Can we simply reuse the `ByteBufferOutputStream` in the `serialize` method? e.g.
   ```
   private val bos = new ByteBufferOutputStream()
   override def serialize[T: ClassTag](t: T): ByteBuffer = {
     bos.reset()
     val out = serializeStream(bos)
     out.writeObject(t)
     out.close()
     bos.toByteBuffer
   }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org