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/05/01 02:10:31 UTC

[GitHub] [spark] attilapiros commented on a change in pull request #24499: [SPARK-25888][Core] Serve local disk persisted blocks by the external service after releasing executor by dynamic allocation

attilapiros commented on a change in pull request #24499: [SPARK-25888][Core] Serve local disk persisted blocks by the external service after releasing executor by dynamic allocation
URL: https://github.com/apache/spark/pull/24499#discussion_r279993777
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/network/SyncBlockTransferClient.scala
 ##########
 @@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.spark.network
+
+import java.nio.ByteBuffer
+
+import scala.concurrent.Promise
+import scala.concurrent.duration.Duration
+
+import org.apache.spark.network.buffer.{FileSegmentManagedBuffer, ManagedBuffer, NioManagedBuffer}
+import org.apache.spark.network.shuffle.{BlockFetchingListener, BlockTransferClient, DownloadFileManager}
+import org.apache.spark.storage.EncryptedManagedBuffer
+import org.apache.spark.util.ThreadUtils
+
+private[spark] class SyncBlockTransferClient(val blockTransferClient: BlockTransferClient) {
 
 Review comment:
   When the external shuffle service is enabled we are creating an external shuffle client (in contrast to `BlockTransferService`) for fetching the blocks:
   
   https://github.com/apache/spark/blob/df3a80da4270c7b5eddb83383d8149ed64b25a66/core/src/main/scala/org/apache/spark/storage/BlockManager.scala#L178-L186  
   
   And `ExternalShuffleClient` is inherited directly from `ShuffleClient`. Likewise `BlockTransferService` so they are "just" siblings and the common functionality must be at least at their parent (`ShuffleClient`) level. 
   
   During the development once I had a version where `ShuffleClient` was used within `SyncBlockTransferClient` instead of `BlockTransferClient` (this way I saved that interface) but for understanding point of view I took that very misleading so I decided to keep `BlockTransferClient`.

----------------------------------------------------------------
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