Skip to content

Commit 88dfb42

Browse files
committed
Fixed formatting in docs table cell, style.
1 parent 3cd1ae8 commit 88dfb42

File tree

2 files changed

+80
-61
lines changed

2 files changed

+80
-61
lines changed

docs/running-on-mesos.md

Lines changed: 77 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -493,33 +493,44 @@ See the [configuration page](configuration.html) for information on Spark config
493493
</td>
494494
<td><code>(none)</code></td>
495495
<td>
496-
A secret is specified by its contents and destination. These properties
497-
specify a secret's contents. To specify a secret's destination, see the cell below.
498-
499-
You can specify a secret's contents either (1) by value or (2) by reference.
500-
(1) To specify a secret by value, set the
501-
<code>spark.mesos.[driver|executor].secret.values</code>
502-
property, to make the secret available in the driver or executors.
503-
For example, to make a secret password "guessme" available to the driver process, set:
504-
505-
<pre>spark.mesos.driver.secret.values=guessme</pre>
506-
507-
(2) To specify a secret that has been placed in a secret store
508-
by reference, specify its name within the secret store
509-
by setting the <code>spark.mesos.[driver|executor].secret.names</code>
510-
property. For example, to make a secret password named "password" in a secret store
511-
available to the driver process, set:
512-
513-
<pre>spark.mesos.driver.secret.names=password</pre>
514-
515-
To specify multiple secrets, provide a comma-separated list:
516-
517-
<pre>spark.mesos.driver.secret.values=guessme,passwd123</pre>
518-
519-
or
520-
521-
<pre>spark.mesos.driver.secret.names=password1,password2</pre>
496+
<p>
497+
A secret is specified by its contents and destination. These properties
498+
specify a secret's contents. To specify a secret's destination, see the cell below.
499+
</p>
500+
<p>
501+
You can specify a secret's contents either (1) by value or (2) by reference.
502+
</p>
503+
<p>
504+
(1) To specify a secret by value, set the
505+
<code>spark.mesos.[driver|executor].secret.values</code>
506+
property, to make the secret available in the driver or executors.
507+
For example, to make a secret password "guessme" available to the driver process, set:
522508

509+
<pre>spark.mesos.driver.secret.values=guessme</pre>
510+
</p>
511+
<p>
512+
(2) To specify a secret that has been placed in a secret store
513+
by reference, specify its name within the secret store
514+
by setting the <code>spark.mesos.[driver|executor].secret.names</code>
515+
property. For example, to make a secret password named "password" in a secret store
516+
available to the driver process, set:
517+
518+
<pre>spark.mesos.driver.secret.names=password</pre>
519+
</p>
520+
<p>
521+
Note: To use a secret store, make sure one has been integrated with Mesos via a custom
522+
<a href="http://mesos.apache.org/documentation/latest/secrets/">SecretResolver
523+
module</a>.
524+
</p>
525+
<p>
526+
To specify multiple secrets, provide a comma-separated list:
527+
528+
<pre>spark.mesos.driver.secret.values=guessme,passwd123</pre>
529+
530+
or
531+
532+
<pre>spark.mesos.driver.secret.names=password1,password2</pre>
533+
</p>
523534
</td>
524535
</tr>
525536

@@ -532,40 +543,48 @@ See the [configuration page](configuration.html) for information on Spark config
532543
</td>
533544
<td><code>(none)</code></td>
534545
<td>
535-
A secret is specified by its contents and destination. These properties
536-
specify a secret's destination. To specify a secret's contents, see the cell above.
537-
538-
You can specify a secret's destination in the driver or
539-
executors as either (1) an environment variable or (2) as a file.
540-
(1) To make an environment-based secret, set the
541-
<code>spark.mesos.[driver|executor].secret.envkeys</code> property.
542-
The secret will appear as an environment variable with the
543-
given name in the driver or executors. For example, to make a secret password available
544-
to the driver process as $PASSWORD, set:
545-
546-
<pre>spark.mesos.driver.secret.envkeys=PASSWORD</pre>
547-
548-
(2) To make a file-based secret, set the
549-
<code>spark.mesos.[driver|executor].secret.filenames</code> property.
550-
The secret will appear in the contents of a file with the given file name in
551-
the driver or executors. For example, to make a secret password available in a
552-
file named "pwdfile" in the driver process, set:
553-
554-
<pre>spark.mesos.driver.secret.filenames=pwdfile</pre>
555-
556-
Paths are relative to the container's work directory. Absolute paths must
557-
already exist. Note: File-based secrets require a custom
558-
<a href="http://mesos.apache.org/documentation/latest/secrets/">SecretResolver
559-
module</a>.
560-
561-
To specify env vars or file names corresponding to multiple secrets,
562-
provide a comma-separated list:
563-
564-
<pre>spark.mesos.driver.secret.envkeys=PASSWORD1,PASSWORD2</pre>
546+
<p>
547+
A secret is specified by its contents and destination. These properties
548+
specify a secret's destination. To specify a secret's contents, see the cell above.
549+
</p>
550+
<p>
551+
You can specify a secret's destination in the driver or
552+
executors as either (1) an environment variable or (2) as a file.
553+
</p>
554+
<p>
555+
(1) To make an environment-based secret, set the
556+
<code>spark.mesos.[driver|executor].secret.envkeys</code> property.
557+
The secret will appear as an environment variable with the
558+
given name in the driver or executors. For example, to make a secret password available
559+
to the driver process as $PASSWORD, set:
560+
561+
<pre>spark.mesos.driver.secret.envkeys=PASSWORD</pre>
562+
</p>
563+
<p>
564+
(2) To make a file-based secret, set the
565+
<code>spark.mesos.[driver|executor].secret.filenames</code> property.
566+
The secret will appear in the contents of a file with the given file name in
567+
the driver or executors. For example, to make a secret password available in a
568+
file named "pwdfile" in the driver process, set:
569+
570+
<pre>spark.mesos.driver.secret.filenames=pwdfile</pre>
571+
</p>
572+
<p>
573+
Paths are relative to the container's work directory. Absolute paths must
574+
already exist. Note: File-based secrets require a custom
575+
<a href="http://mesos.apache.org/documentation/latest/secrets/">SecretResolver
576+
module</a>.
577+
</p>
578+
<p>
579+
To specify env vars or file names corresponding to multiple secrets,
580+
provide a comma-separated list:
581+
582+
<pre>spark.mesos.driver.secret.envkeys=PASSWORD1,PASSWORD2</pre>
565583

566-
or
584+
or
567585

568-
<pre>spark.mesos.driver.secret.filenames=pwdfile1,pwdfile2</pre>
586+
<pre>spark.mesos.driver.secret.filenames=pwdfile1,pwdfile2</pre>
587+
</p>
569588
</td>
570589
</tr>
571590

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackendUtil.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@ private[mesos] object MesosSchedulerBackendUtil extends Logging {
193193
}
194194

195195
val referenceSecrets: Seq[Secret] =
196-
conf.get(secretConfig.SECRET_NAMES).getOrElse(Nil).map(s => createReferenceSecret(s))
196+
conf.get(secretConfig.SECRET_NAMES).getOrElse(Nil).map { s => createReferenceSecret(s) }
197197

198198
val valueSecrets: Seq[Secret] = {
199-
conf.get(secretConfig.SECRET_VALUES).getOrElse(Nil).map(s => createValueSecret(s))
199+
conf.get(secretConfig.SECRET_VALUES).getOrElse(Nil).map { s => createValueSecret(s) }
200200
}
201201

202202
if (valueSecrets.nonEmpty && referenceSecrets.nonEmpty) {
203-
throw new SparkException("Cannot specify VALUE type secrets and REFERENCE types ones")
203+
throw new SparkException("Cannot specify both value-type and reference-type secrets.")
204204
}
205205

206206
if (referenceSecrets.nonEmpty) referenceSecrets else valueSecrets

0 commit comments

Comments
 (0)