Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21428#discussion_r191018976
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/shuffle/UnsafeRowWriter.scala
 ---
    @@ -0,0 +1,54 @@
    +/*
    + * 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.sql.execution.streaming.continuous.shuffle
    +
    +import org.apache.spark.Partitioner
    +import org.apache.spark.rpc.RpcEndpointRef
    +import org.apache.spark.sql.catalyst.expressions.UnsafeRow
    +
    +/**
    + * A [[ContinuousShuffleWriter]] sending data to [[UnsafeRowReceiver]] 
instances.
    + *
    + * @param writerId The partition ID of this writer.
    + * @param outputPartitioner The partitioner on the reader side of the 
shuffle.
    + * @param endpoints The [[UnsafeRowReceiver]] endpoints to write to. 
Indexed by partition ID within
    + *                  outputPartitioner.
    + */
    +class UnsafeRowWriter(
    --- End diff --
    
    Looking at this PR and prev PRs, I think the names `UnsafeRowWriter` and 
`UnsafeRowReader` are not right. The basic interfaces 
`ContinuousShuffleReader/Writer` take UnsafeRows, hence that's not unique to 
this implementation (that is, all implementation of these interfaces will 
read/write UnsafeRows). What's unique is that this implementation uses RPC 
mechanism to read/write. So it may be more accurate to name them 
`RPCContinuousShuffleReader/Writer`, or something like that.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to