Skip to content

Improve document for IDE support and simplify doc build#654

Merged
yaooqinn merged 12 commits intoapache:asf-sitefrom
cloud-fan:ide
Dec 26, 2025
Merged

Improve document for IDE support and simplify doc build#654
yaooqinn merged 12 commits intoapache:asf-sitefrom
cloud-fan:ide

Conversation

@cloud-fan
Copy link
Contributor

This PR does two things:

  • Update developer-tools.md to give more details about IDE setup, w.r.t. my success tries
  • Simplify the doc build using docker

@cloud-fan
Copy link
Contributor Author

cc @pan3793 @yaooqinn

README.md Outdated
--mount type=bind,source="/path/to/spark-website",target="/spark-website" \
-w /spark-website \
docs-builder:latest \
/bin/bash -c "sh .github/run-in-container.sh"
Copy link
Member

Choose a reason for hiding this comment

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

.github? Maybe it is better to be in dev?

<h4>IntelliJ</h4>

While many of the Spark developers use SBT or Maven on the command line, the most common IDE we
use is IntelliJ IDEA. You can get the community edition for free (Apache committers can get
Copy link
Member

Choose a reason for hiding this comment

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

choose "Detect automatically" for `Generated source folders`, and choose "generate sources" for
`Phase to be used for folders update`.
- Go to `Settings -> Build, Execution, Deployment -> Compiler -> Scala Compiler -> Scala Compiler Server`,
pick a large enough number for `Maximum heap size, MB`, such as "16000".
Copy link
Member

Choose a reason for hiding this comment

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

the default is 2g, which does not suffice for Spark, but 16g seems to be too aggressive, this might scare off many developers, I tested 4g also works


Make sure you have a clean start before setting up the IDE: A clean git clone of the Spark repo, install the latest
version of the IDE. If something goes wrong, clear the build outputs by `./build/sbt clean` and `./build/mvn clean`,
clear the m2 cache by `rm -rf ~/.m2/repository/*`, remove the IDE folder such as `.idea`, re-import the project into
Copy link
Member

Choose a reason for hiding this comment

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

Looks it's IDEA-specific, can we move this to IntelliJ section?

@yaooqinn yaooqinn merged commit 90c156e into apache:asf-site Dec 26, 2025
1 check passed
@cloud-fan cloud-fan deleted the ide branch December 27, 2025 13:58
#

# 1.Set env variable.
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-arm64
Copy link
Member

Choose a reason for hiding this comment

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

@cloud-fan this assumes the developer uses arm machine ...

BTW, is Java required in website building?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This script runs in the docker, so the local env does not matter.

Copy link
Member

Choose a reason for hiding this comment

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

this depends on the cpu platform, for intel cpu, the suffix is -amd64, not -arm64

Once the image is built, navigate to the `spark-website` root directory, run the script which processes
the Markdown files in the Docker container.
```
SPARK_WEBSITE_PATH="/path/to/spark-website" sh .dev/build-docs.sh
Copy link
Member

@pan3793 pan3793 Feb 10, 2026

Choose a reason for hiding this comment

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

I think env var SPARK_WEBSITE_PATH is not used. and grant x permission to .dev/*.sh then we don't need use sh foo.sh to run the script

Copy link
Member

Choose a reason for hiding this comment

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

opened #675 to address the issues I found

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants