You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/11/18 04:13:11 UTC

[GitHub] [incubator-kyuubi] cfmcgrady commented on a diff in pull request #3817: [KYUUBI #3818] [PySpark] set kyuubi.session.user in withLocalProperties

cfmcgrady commented on code in PR #3817:
URL: https://github.com/apache/incubator-kyuubi/pull/3817#discussion_r1025970059


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/ExecutePython.scala:
##########
@@ -63,6 +64,19 @@ class ExecutePython(
       new ArrayFetchIterator[Row](Array(Row(output, status, ename, evalue, Row(traceback: _*))))
   }
 
+  override protected def withLocalProperties[T](f: => T): T = {
+    val setSparkLocalProperties = (key: String, value: String) => {
+      worker.runCode(s"spark.sparkContext.setLocalProperty('$key', '$value')")

Review Comment:
   we should also set other properties like what we did in scala-mode.
   
   https://github.com/apache/incubator-kyuubi/blob/dcf0ce6dcf23f3863f805e8039deda3ab66664c8/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala#L76-L94



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org