-
Notifications
You must be signed in to change notification settings - Fork 118
Add Support for some kubernetes client settings #469
base: branch-2.2-kubernetes
Are you sure you want to change the base?
Add Support for some kubernetes client settings #469
Conversation
854192b
to
746dea7
Compare
@@ -81,6 +81,30 @@ private[spark] object SparkKubernetesClientFactory { | |||
}.withOption(namespace) { | |||
(ns, configBuilder) => configBuilder.withNamespace(ns) | |||
}.build() | |||
val conn_timeout_properties = sparkConf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel case please for all the new vals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -545,4 +545,36 @@ package object config extends Logging { | |||
resolvedURL | |||
} | |||
} | |||
|
|||
private[spark] val KUBERNETES_CLIENT_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY = | |||
ConfigBuilder("spark.kubernetes.client.watch.reconnectInterval") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration properties should include time unit in the property names, e.g., reconnectInternalInMs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
private[spark] val KUBERNETES_CLIENT_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY = | ||
ConfigBuilder("spark.kubernetes.client.watch.reconnectInterval") | ||
.doc("spark kubernetes client watch reconnectInterval," + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of our config properties docs start with a Capital letter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -545,4 +545,36 @@ package object config extends Logging { | |||
resolvedURL | |||
} | |||
} | |||
|
|||
private[spark] val KUBERNETES_CLIENT_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY = | |||
ConfigBuilder("spark.kubernetes.client.watch.reconnectInterval") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to define a command prefix for the keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
.doc("spark kubernetes client watch reconnectInterval," + | ||
"which is relevant to KUBERNETES_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY" + | ||
" in io.fabric8.kubernetes.client.Config.") | ||
.stringConf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use intConf
with default values everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually timeConf
might make some sense in some of these cases. I think these should have default values that are specified in the config entries and not in the main logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Document all new properties in |
746dea7
to
5038d68
Compare
Done for |
5038d68
to
d8ba177
Compare
Please rebase against the latest branch-2.2-kubernetes. |
docs/running-on-kubernetes.md
Outdated
<td><code>1s</code></td> | ||
<td> | ||
Spark kubernetes client watch reconnectInterval, which is relevant to | ||
<code>KUBERNETES_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY</code> in io.fabric8.kubernetes.client.Config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use semantic meanings here as opposed to meanings specific to the code implementation. For example, this documentation becomes incorrect if we end up not using the Fabric8 Kubernetes client. The other settings provide some examples that this can be based on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
private[spark] val KUBERNETES_CLIENT_WATCH_RECONNECT_LIMIT_SYSTEM_PROPERTY = | ||
ConfigBuilder("spark.kubernetes.client.watch.reconnectLimit") | ||
.doc("Spark kubernetes client watch reconnectLimit," + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use semantic meanings in these docs, as opposed to implementation specific. "Limit of times where connections can be attempted for watching resources" or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
55eb126
to
7ad8238
Compare
Done |
docs/running-on-kubernetes.md
Outdated
<td><code>spark.kubernetes.client.watch.reconnectLimit</code></td> | ||
<td><code>-1</code></td> | ||
<td> | ||
Limit of times where connections can be attempted for kubernetes client request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete where
. And change request
to requests
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Minor comment. Also it seems this is still out-of-date with the base branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liyinan926 rebase Done.
docs/running-on-kubernetes.md
Outdated
<td><code>spark.kubernetes.client.watch.reconnectLimit</code></td> | ||
<td><code>-1</code></td> | ||
<td> | ||
Limit of times where connections can be attempted for kubernetes client request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Add Support for `spark.kubernetes.client.watch.reconnectInterval`(which is relevant to KUBERNETES_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.) Add Support for `spark.kubernetes.client.watch.reconnectLimit`(which is relevant to KUBERNETES_WATCH_RECONNECT_LIMIT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.) Add Support for `spark.kubernetes.client.connection.timeout`(which is relevant to KUBERNETES_CONNECTION_TIMEOUT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.) Add Support for `spark.kubernetes.client.request.timeout`(which is relevant to KUBERNETES_REQUEST_TIMEOUT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.) Signed-off-by: duyanghao <1294057873@qq.com>
17c52d5
to
7f06745
Compare
LGTM. |
After the build passes following the updated branch we can merge this. |
Signed-off-by: duyanghao <1294057873@qq.com>
… broadcast object (apache-spark-on-k8s#469) … broadcast object ## What changes were proposed in this pull request? This PR changes the broadcast object in TorrentBroadcast from a strong reference to a weak reference. This allows it to be garbage collected even if the Dataset is held in memory. This is ok, because the broadcast object can always be re-read. ## How was this patch tested? Tested in Spark shell by taking a heap dump, full repro steps listed in https://issues.apache.org/jira/browse/SPARK-25998. Closes apache#22995 from bkrieger/bk/torrent-broadcast-weak. Authored-by: Brandon Krieger <bkrieger@palantir.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
What changes were proposed in this pull request?
Add Support for
spark.kubernetes.client.watch.reconnectInterval
(which is relevant to KUBERNETES_WATCH_RECONNECT_INTERVAL_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.)Add Support for
spark.kubernetes.client.watch.reconnectLimit
(which is relevant to KUBERNETES_WATCH_RECONNECT_LIMIT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.)Add Support for
spark.kubernetes.client.connection.timeout
(which is relevant to KUBERNETES_CONNECTION_TIMEOUT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.)Add Support for
spark.kubernetes.client.request.timeout
(which is relevant to KUBERNETES_REQUEST_TIMEOUT_SYSTEM_PROPERTY in io.fabric8.kubernetes.client.Config.)How was this patch tested?
start submit with following pars:
Tests on my cluster show that above settings do work.