Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SW-683] Fix starting H2OContext on Databricks #544

Merged
merged 1 commit into from Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/h2o/H2OContext.scala
Expand Up @@ -127,8 +127,8 @@ class H2OContext private(val sparkSession: SparkSession, conf: H2OConf) extends
h2oNodes.append(nodes: _*)
localClientIp = sys.env.getOrElse("SPARK_PUBLIC_DNS", sparkContext.env.rpcEnv.address.host)
localClientPort = H2O.API_PORT
// Register UI
if (conf.getBoolean("spark.ui.enabled", true)) {
// Register UI, but not in Databricks as Databricks is not using standard Spark UI API
if (conf.getBoolean("spark.ui.enabled", true) && !isRunningOnDatabricks()) {
new SparklingWaterUITab(sparklingWaterListener, sparkContext.ui.get)
}

Expand Down
Expand Up @@ -77,4 +77,13 @@ private[spark] trait H2OContextUtils extends Logging {
}
}

def isRunningOnDatabricks(): Boolean = {
try {
Class.forName("com.databricks.backend.daemon.driver.DriverLocal")
true
} catch {
case _: ClassNotFoundException => false
}
}

}
1 change: 0 additions & 1 deletion doc/tutorials/pysparkling_azure_dbc.rst
Expand Up @@ -29,7 +29,6 @@ To start Sparkling Water ``H2OContext`` on Databricks Azure, the steps are:
4. Create the cluster

- Make sure the library is attached to the cluster
- Put ``spark.ui.enabled false`` line in the spark configuration field. This is currently required due to limitation in our code and will be fixed as soon as possible.

- Select Spark version according to you Sparkling Water version:
- for the latest PySparkling 2.2, select Spark 2.2.1.
Expand Down
1 change: 0 additions & 1 deletion doc/tutorials/rsparkling_azure_dbc.rst
Expand Up @@ -26,7 +26,6 @@ To start Sparkling Water ``H2OContext`` on Databricks Azure, the steps are:
4. Create the cluster

- Make sure the assembly JAR is attached to the cluster
- Put ``spark.ui.enabled false`` line in the spark configuration field. This is currently required due to limitation in our code and will be fixed as soon as possible.

- Select Spark version according to your Sparkling Water version:
- for the latest Sparkling Water 2.2.7, select Spark 2.2.0. Spark 2.2.1 is not yet supported due to missing SparklyR support.
Expand Down
1 change: 0 additions & 1 deletion doc/tutorials/sw_azure_dbc.rst
Expand Up @@ -27,7 +27,6 @@ To start Sparkling Water ``H2OContext`` on Databricks Azure, the steps are:
4. Create the cluster

- Make sure the assembly JAR is attached to the cluster
- Put ``spark.ui.enabled false`` line in the spark configuration field. This is currently required due to limitation in our code and will be fixed as soon as possible.

- Select Spark version according to your Sparkling Water version:
- for the latest Sparkling Water 2.2.7, select Spark 2.2.1.
Expand Down