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

2019-08-26 Thread GitBox
kiszk 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_r317881044
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
 ##
 @@ -261,20 +265,20 @@ private[netty] class NettyRpcEnv(
   }
 
   private[netty] def serialize(content: Any): ByteBuffer = {
-javaSerializerInstance.serialize(content)
+serializer.get().serialize(content)
   }
 
   /**
* Returns [[SerializationStream]] that forwards the serialized bytes to 
`out`.
*/
   private[netty] def serializeStream(out: OutputStream): SerializationStream = 
{
-javaSerializerInstance.serializeStream(out)
+serializer.get.serializeStream(out)
   }
 
   private[netty] def deserialize[T: ClassTag](client: TransportClient, bytes: 
ByteBuffer): T = {
 NettyRpcEnv.currentClient.withValue(client) {
   deserialize { () =>
-javaSerializerInstance.deserialize[T](bytes)
+serializer.get.deserialize[T](bytes)
 
 Review comment:
   ditto


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



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

2019-08-26 Thread GitBox
kiszk 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_r317881031
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
 ##
 @@ -261,20 +265,20 @@ private[netty] class NettyRpcEnv(
   }
 
   private[netty] def serialize(content: Any): ByteBuffer = {
-javaSerializerInstance.serialize(content)
+serializer.get().serialize(content)
   }
 
   /**
* Returns [[SerializationStream]] that forwards the serialized bytes to 
`out`.
*/
   private[netty] def serializeStream(out: OutputStream): SerializationStream = 
{
-javaSerializerInstance.serializeStream(out)
+serializer.get.serializeStream(out)
 
 Review comment:
   nit: do we want to use the same style for `use`? Probably, `get`


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



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

2019-08-26 Thread GitBox
kiszk 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_r317881031
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
 ##
 @@ -261,20 +265,20 @@ private[netty] class NettyRpcEnv(
   }
 
   private[netty] def serialize(content: Any): ByteBuffer = {
-javaSerializerInstance.serialize(content)
+serializer.get().serialize(content)
   }
 
   /**
* Returns [[SerializationStream]] that forwards the serialized bytes to 
`out`.
*/
   private[netty] def serializeStream(out: OutputStream): SerializationStream = 
{
-javaSerializerInstance.serializeStream(out)
+serializer.get.serializeStream(out)
 
 Review comment:
   nit: do we want to use the same style for `use`? Probably, `get()`


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



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

2019-08-26 Thread GitBox
kiszk 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_r317881044
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
 ##
 @@ -261,20 +265,20 @@ private[netty] class NettyRpcEnv(
   }
 
   private[netty] def serialize(content: Any): ByteBuffer = {
-javaSerializerInstance.serialize(content)
+serializer.get().serialize(content)
   }
 
   /**
* Returns [[SerializationStream]] that forwards the serialized bytes to 
`out`.
*/
   private[netty] def serializeStream(out: OutputStream): SerializationStream = 
{
-javaSerializerInstance.serializeStream(out)
+serializer.get.serializeStream(out)
   }
 
   private[netty] def deserialize[T: ClassTag](client: TransportClient, bytes: 
ByteBuffer): T = {
 NettyRpcEnv.currentClient.withValue(client) {
   deserialize { () =>
-javaSerializerInstance.deserialize[T](bytes)
+serializer.get.deserialize[T](bytes)
 
 Review comment:
   ditto


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



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

2019-08-26 Thread GitBox
kiszk 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_r317519421
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/serializer/JavaSerializer.scala
 ##
 @@ -140,21 +171,24 @@ private[spark] class JavaSerializerInstance(
 class JavaSerializer(conf: SparkConf) extends Serializer with Externalizable {
   private var counterReset = conf.get(SERIALIZER_OBJECT_STREAM_RESET)
   private var extraDebugInfo = conf.get(SERIALIZER_EXTRA_DEBUG_INFO)
+  private var cacheResolvedClasses = 
conf.get(JAVA_SERIALIZER_CACHE_RESOLVED_CLASSES)
 
 Review comment:
   nvm
   ~~Can we use `val` for these three values?~~


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:
us...@infra.apache.org


With regards,
Apache Git Services

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



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

2019-08-26 Thread GitBox
kiszk 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_r317519421
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/serializer/JavaSerializer.scala
 ##
 @@ -140,21 +171,24 @@ private[spark] class JavaSerializerInstance(
 class JavaSerializer(conf: SparkConf) extends Serializer with Externalizable {
   private var counterReset = conf.get(SERIALIZER_OBJECT_STREAM_RESET)
   private var extraDebugInfo = conf.get(SERIALIZER_EXTRA_DEBUG_INFO)
+  private var cacheResolvedClasses = 
conf.get(JAVA_SERIALIZER_CACHE_RESOLVED_CLASSES)
 
 Review comment:
   Can we use `val` for these three values?


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:
us...@infra.apache.org


With regards,
Apache Git Services

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