-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-16987] [None] Add spark-default.conf property to define https port for spark history server #15652
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
[SPARK-16987] [None] Add spark-default.conf property to define https port for spark history server #15652
Changes from 8 commits
955a82c
8ac0369
47108b4
3964609
1e2c985
935415c
62aeb6c
bd945aa
9d69f02
30a2927
83df9bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,15 +307,26 @@ private[spark] object JettyUtils extends Logging { | |
| connectors += httpConnector | ||
|
|
||
| sslOptions.createJettySslContextFactory().foreach { factory => | ||
| // If the new port wraps around, do not try a privileged port. | ||
|
|
||
| require(sslOptions.port == 0 || (1024 <= sslOptions.port && sslOptions.port < 65536), | ||
| "securePort should be between 1024 and 65535 (inclusive)," + | ||
| " or 0 for determined automatically.") | ||
|
|
||
| val securePort = | ||
| if (currentPort != 0) { | ||
| (currentPort + 400 - 1024) % (65536 - 1024) + 1024 | ||
| // If the new port wraps around, do not try a privileged port. | ||
| if (1024 <= sslOptions.port && sslOptions.port < 65536) { | ||
|
||
| sslOptions.port | ||
| } else { | ||
| // If the new port wraps around, do not try a privilege port | ||
| (currentPort + 400 - 1024) % (65536 - 1024) + 1024 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment in the code explaining the math done here ? It will help readability of the code. |
||
| } | ||
| } else { | ||
| 0 | ||
| } | ||
| val scheme = "https" | ||
| // Create a connector on port securePort to listen for HTTPS requests | ||
| // Create a connector on port securePort to listen for HTTPS requests. | ||
|
|
||
| val connector = new ServerConnector(server, factory) | ||
| connector.setPort(securePort) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1663,6 +1663,16 @@ Apart from these, the following properties are also available, and may be useful | |
| page. | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td><code>spark.ssl.port</code></td> | ||
| <td>0</td> | ||
| <td> | ||
| Port number to listen on for SSL connections. | ||
| The SSL port should be between 1024 and 65535 (inclusive). | ||
| Default value of 0 means the port will be determined automatically. | ||
| Attention that the port should be separated for each particular protocols. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be clearer to write something like "Note that the SSL port for individual services can be overridden by setting values like
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the code above you are ensuring that the SSL port is always between 1024 and 65536. You could document that here as "allowed range of values".
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it's clear what the last sentence means. I'd either remove it or say something like "the port can be specified for services individually, with properties like |
||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td><code>spark.ssl.needClientAuth</code></td> | ||
| <td>false</td> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ private[ml] trait VectorIndexerParams extends Params with HasInputCol with HasOu | |
| * - This helps process a dataset of unknown vectors into a dataset with some continuous | ||
| * features and some categorical features. The choice between continuous and categorical | ||
| * is based upon a maxCategories parameter. | ||
| * - Set maxCategories to the maximum number of categorical any categorical feature should have. | ||
| * - Set maxCategories to the maximum number of categories which categorical feature should have. | ||
|
||
| * - E.g.: Feature 0 has unique values {-1.0, 0.0}, and feature 1 values {1.0, 3.0, 5.0}. | ||
| * If maxCategories = 2, then feature 0 will be declared categorical and use indices {0, 1}, | ||
| * and feature 1 will be declared continuous. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,8 +85,10 @@ private[ml] trait DecisionTreeParams extends PredictorParams | |
| * (default = 256 MB) | ||
| * @group expertParam | ||
| */ | ||
| final val maxMemoryInMB: IntParam = new IntParam(this, "maxMemoryInMB", | ||
| "Maximum memory in MB allocated to histogram aggregation.", | ||
| final val maxMemoryInMB: IntParam = new IntParam(this, "maxMemoryInMB", "Maximum memory in MB" + | ||
|
||
| " allocated to histogram aggregation." + | ||
| " If too small, then 1 node will be split per iteration," + | ||
| " and its aggregates may exceed this size.", | ||
| ParamValidators.gtEq(0)) | ||
|
|
||
| /** | ||
|
|
||
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.
This comment is duplicated and not correct here