walterddr commented on code in PR #10209:
URL: https://github.com/apache/pinot/pull/10209#discussion_r1093811586
##########
pinot-connectors/pinot-spark-connector/src/main/scala/org/apache/pinot/connector/spark/connector/PinotGrpcServerDataFetcher.scala:
##########
@@ -25,14 +25,15 @@ import org.apache.pinot.common.proto.Server.ServerRequest
import org.apache.pinot.connector.spark.utils.Logging
import org.apache.pinot.spi.config.table.TableType
+import java.io.Closeable
import scala.collection.JavaConverters._
/**
* Data fetcher from Pinot Grpc server with specific segments.
* Eg: offline-server1: segment1, segment2, segment3
*/
private[pinot] class PinotGrpcServerDataFetcher(pinotSplit: PinotSplit)
- extends Logging {
+ extends Logging with Closeable {
Review Comment:
it might be eaiser to move channel/stub inside fetchData method as they are
used once and are not globally shared
##########
pinot-connectors/pinot-spark-connector/src/main/scala/org/apache/pinot/connector/spark/datasource/PinotInputPartitionReader.scala:
##########
@@ -23,17 +23,20 @@ import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.sources.v2.reader.InputPartitionReader
import org.apache.spark.sql.types.StructType
+import java.io.Closeable
+
/**
* Actual data reader on spark worker side.
- * Represents a spark partition, and is receive data from specified pinot
server-segment list.
+ * Represents a spark partition, and receives data from specified pinot
server-segment list.
*/
class PinotInputPartitionReader(
- schema: StructType,
- partitionId: Int,
- pinotSplit: PinotSplit,
- dataSourceOptions: PinotDataSourceReadOptions)
+ schema: StructType,
+ partitionId: Int,
+ pinotSplit: PinotSplit,
+ dataSourceOptions: PinotDataSourceReadOptions)
Review Comment:
nit: please revert style changes
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]