github-actions[bot] commented on code in PR #41837:
URL: https://github.com/apache/beam/pull/41837#discussion_r4750575103
##########
website/www/site/content/en/documentation/runners/spark.md:
##########
@@ -219,6 +219,22 @@ with beam.Pipeline(options) as p:
...
{{< /highlight >}}
+{{< paragraph class="language-java" >}}To run a Java pipeline on the portable
Spark runner, first start the JobService with `docker run --net=host
apache/beam_spark_job_server:latest` (or `./gradlew
:runners:spark:3:job-server:runShadow` from Beam source code). Then pass these
pipeline options to your pipeline: `--runner=PortableRunner`,
`--jobEndpoint=localhost:8099` (the address the JobService listens on by
default), and `--defaultEnvironmentType=LOOPBACK`. For example:{{< /paragraph
>}}
Review Comment:
**🔴 Critical**: The switcher at the top of this page maps
`data-value="java"` to **Non portable (Java)** and `data-value="py"` to
**Portable (Java/Python/Go)** (lines 61–62). Because `language-switch-v2.js`
hides all `[class^=language-]` elements that do not match the selected tab,
marking these paragraphs with `class="language-java"` and the code block with
`{{< highlight java >}}` causes these PortableRunner instructions to be
**hidden** when a user selects "Portable (Java/Python/Go)" and erroneously
displayed under "Non portable (Java)".
Furthermore, placing `{{< highlight java >}}` (`div.language-java`) after
`{{< highlight py >}}` (`div.language-py`) causes `language-switch-v2.js` to
inject a language tab bar where clicking "Java" switches the entire page back
to the "Non portable (Java)" mode.
To display this under the "Portable (Java/Python/Go)" mode, these paragraphs
and the code snippet either need `language-py` (for example, `{{< paragraph
class="language-py" >}}` and `{{< highlight language="py" >}}`), or the page's
top-level switcher needs to be refactored to separate `portable` from `py`
(similar to `flink.md`).Also consider noting that Java pipelines using
`PortableRunner` require the `org.apache.beam:beam-runners-portability-java`
dependency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]