Skip to content

Commit

Permalink
[MINOR][CONNECT] Fix some typos in connect server module
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
This pr just fix some typos in connect server module

### Why are the changes needed?
Fix typos

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

Closes apache#42259 from LuciferYang/connect-server-typo.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: yangjie01 <[email protected]>
  • Loading branch information
LuciferYang authored and ragnarok56 committed Mar 2, 2024
1 parent 83035e1 commit fb1783e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ package object dsl {
def randomSplit(weights: Array[Double], seed: Long): Array[Relation] = {
require(
weights.forall(_ >= 0),
s"Weights must be nonnegative, but got ${weights.mkString("[", ",", "]")}")
s"Weights must be non-negative, but got ${weights.mkString("[", ",", "]")}")
require(
weights.sum > 0,
s"Sum of weights must be positive, but got ${weights.mkString("[", ",", "]")}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import org.apache.spark.util.Utils
private[connect] class ExecuteThreadRunner(executeHolder: ExecuteHolder) extends Logging {

// The newly created thread will inherit all InheritableThreadLocals used by Spark,
// e.g. SparkContext.localProperties. If considering implementing a threadpool,
// e.g. SparkContext.localProperties. If considering implementing a thread-pool,
// forwarding of thread locals needs to be taken into account.
private var executionThread: Thread = new ExecutionThread()

Expand Down Expand Up @@ -166,7 +166,7 @@ private[connect] class ExecuteThreadRunner(executeHolder: ExecuteHolder) extends
executeHolder.responseObserver.onNext(createResultComplete())
}
synchronized {
// Prevent interrupt after onCompleted, and throwing error to an alredy closed stream.
// Prevent interrupt after onCompleted, and throwing error to an already closed stream.
completed = true
executeHolder.responseObserver.onCompleted()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ object StreamingForeachBatchHelper extends Logging {
}

// TODO(SPARK-44433): Improve termination of Processes
// The goal is that when a query is terminated, the python process asociated with foreachBatch
// should be terminated. One way to do that is by registering stremaing query listener:
// The goal is that when a query is terminated, the python process associated with foreachBatch
// should be terminated. One way to do that is by registering streaming query listener:
// After pythonForeachBatchWrapper() is invoked by the SparkConnectPlanner.
// At that time, we don't have the streaming queries yet.
// Planner should call back into this helper with the query id when it starts it immediately
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private[connect] class ExecuteHolder(

/**
* Tag that is set for this execution on SparkContext, via SparkContext.addJobTag. Used
* (internally) for cancallation of the Spark Jobs ran by this execution.
* (internally) for cancellation of the Spark Jobs ran by this execution.
*/
val jobTag = ExecuteJobTag(sessionHolder.userId, sessionHolder.sessionId, operationId)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object SparkConnectInterceptorRegistry {

// Contains the list of configured interceptors.
private lazy val interceptorChain: Seq[InterceptorBuilder] = Seq(
// Adding a new interceptor at compile time works like the eaxmple below with the dummy
// Adding a new interceptor at compile time works like the example below with the dummy
// interceptor:
// interceptor[DummyInterceptor](classOf[DummyInterceptor])
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ object SparkConnectService extends Logging {
// For testing purpose, it's package level private.
private[connect] def localPort: Int = {
assert(server != null)
// Return the actual local port being used. This can be different from the csonfigured port
// Return the actual local port being used. This can be different from the configured port
// when the server binds to the port 0 as an example.
server.getPort
}
Expand Down Expand Up @@ -375,7 +375,7 @@ object SparkConnectService extends Logging {
}

/**
* Starts the GRPC Serivce.
* Starts the GRPC Service.
*/
private def startGRPCService(): Unit = {
val debugMode = SparkEnv.get.conf.getBoolean("spark.connect.grpc.debug.enabled", true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private[connect] class SparkConnectStreamingQueryCache(

/**
* Periodic maintenance task to do the following:
* - Update status of query if it is inactive. Sets an expiery time for such queries
* - Update status of query if it is inactive. Sets an expiry time for such queries
* - Drop expired queries from the cache.
* - Poll sessions associated with the cached queries in order keep them alive in connect
* service' mapping (by invoking `sessionKeepAliveFn`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private[connect] class SparkConnectServerListener(
executionData.state = ExecutionState.READY
updateLiveStore(executionData)
case None =>
logWarning(s"onOperationReadyForExectuion called with unknown operation id: ${e.jobTag}")
logWarning(s"onOperationReadyForExecution called with unknown operation id: ${e.jobTag}")
}
}

Expand Down

0 comments on commit fb1783e

Please sign in to comment.