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-1731] Deprecate h2oNodeWebEnabled for external backend #1636

Merged
merged 1 commit into from
Nov 25, 2019
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ trait SharedBackendConf {
def h2oNodeLogDir = sparkConf.getOption(PROP_NODE_LOG_DIR._1)
def uiUpdateInterval = sparkConf.getInt(PROP_UI_UPDATE_INTERVAL._1, PROP_UI_UPDATE_INTERVAL._2)
def cloudTimeout = sparkConf.getInt(PROP_CLOUD_TIMEOUT._1, PROP_CLOUD_TIMEOUT._2)
def h2oNodeWebEnabled = sparkConf.getBoolean(PROP_NODE_ENABLE_WEB._1, PROP_NODE_ENABLE_WEB._2)
def h2oNodeWebEnabled = {
logWarningH2ONodeWebEnabledDeprecated()
sparkConf.getBoolean(PROP_NODE_ENABLE_WEB._1, PROP_NODE_ENABLE_WEB._2)
}
def nodeNetworkMask = sparkConf.getOption(PROP_NODE_NETWORK_MASK._1)
def stacktraceCollectorInterval = sparkConf.getInt(PROP_NODE_STACK_TRACE_COLLECTOR_INTERVAL._1, PROP_NODE_STACK_TRACE_COLLECTOR_INTERVAL._2)
def contextPath = sparkConf.getOption(PROP_CONTEXT_PATH._1)
Expand Down Expand Up @@ -144,8 +147,14 @@ trait SharedBackendConf {
def setUiUpdateInterval(interval: Int) = set(PROP_UI_UPDATE_INTERVAL._1, interval.toString)
def setCloudTimeout(timeout: Int) = set(PROP_CLOUD_TIMEOUT._1, timeout.toString)

def setH2ONodeWebEnabled() = set(PROP_NODE_ENABLE_WEB._1, true)
def setH2ONodeWebDisabled() = set(PROP_NODE_ENABLE_WEB._1, false)
def setH2ONodeWebEnabled() = {
logWarningH2ONodeWebEnabledDeprecated()
set(PROP_NODE_ENABLE_WEB._1, true)
}
def setH2ONodeWebDisabled() = {
logWarningH2ONodeWebEnabledDeprecated()
set(PROP_NODE_ENABLE_WEB._1, false)
}

def setNodeNetworkMask(mask: String) = set(PROP_NODE_NETWORK_MASK._1, mask)

Expand Down Expand Up @@ -204,6 +213,12 @@ trait SharedBackendConf {

private[backends] def getFileProperties(): Seq[(String, _)] = Seq(PROP_JKS, PROP_LOGIN_CONF)

private def logWarningH2ONodeWebEnabledDeprecated(): Unit = {
if (runsInExternalClusterMode) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this hold only if the client is disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it's on purpose like this, preparing the code for the future steps

logWarning(s"Starting from release 3.28, the configuration option '${PROP_NODE_ENABLE_WEB._1}' will no longer" +
s" have any effect in external backend. The H2O nodes in the external backend will always start Rest API.")
}
}
}

object SharedBackendConf {
Expand Down