From 00d8b2696e89d11599889fe77e555ae0a5442646 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Thu, 20 Jun 2024 14:38:51 +0200 Subject: [PATCH] SparkIntegration now uses spark connect :) --- .../org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt | 2 ++ .../org/jetbrains/kotlinx/spark/api/jupyter/SparkIntegration.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt b/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt index 13b22b47..055d695b 100644 --- a/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt +++ b/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/Integration.kt @@ -299,6 +299,8 @@ abstract class Integration(protected val notebook: Notebook, private val options "| ${param.index} -> this.${param.name}" } + println("Sparkified `$name`, this class can be used by Spark in a new cell.") + @Language("kotlin") val code = """ diff --git a/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/SparkIntegration.kt b/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/SparkIntegration.kt index 11117ed6..3446d6dc 100644 --- a/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/SparkIntegration.kt +++ b/jupyter/src/main/kotlin/org/jetbrains/kotlinx/spark/api/jupyter/SparkIntegration.kt @@ -200,7 +200,7 @@ class SparkIntegration(notebook: Notebook, options: MutableMap) try { spark!!.addArtifact(it) } catch (e: Exception) { - println("Error while adding artifact $it: $e") + if (properties.debug) println("Error while adding artifact $it: $e") } }