juliuszsompolski commented on code in PR #41005: URL: https://github.com/apache/spark/pull/41005#discussion_r1182433603
########## connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecutePlanHolder.scala: ########## @@ -0,0 +1,38 @@ +/* + * 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.connect.service + +import org.apache.spark.connect.proto + +case class ExecutePlanHolder( + operationId: String, + sessionHolder: SessionHolder, + request: proto.ExecutePlanRequest) { + + val jobGroupId = Review Comment: For now there is no public API for user to set job group in Spark Connect. I recognize it may conflict with internal places that reset the job group like e.g. in broadcast https://github.com/apache/spark/pull/24595/files#diff-efb1686b99deabef10a1012d687fbb24d38f196575fff75a553c498587318447R75 But this first iteration is a bit best effort anyway, as it won't interrupt stuff that is not actively running a Spark Job. I will continue working to improve it as described in the PR: by separating execution into a different thread that can also be interrupted, so that we can interrupt while not in Spark Jobs. It looks that it would also be better to not rely on job group id but have some other mechanism of cancelling jobs, but that doesn't exist yet. The problems with cancelling based on jobgroupid exist also elsewhere, e.g. in Thriftserver https://github.com/juliuszsompolski/apache-spark/blob/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala#L247. I will look into it in followup. -- 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]
