Repository navigation
[Website] Add new Java quickstart - #22747
Conversation
|
R: @kennknowles |
|
It looks like the linter found some trailing spaces (spaces or tabs after the last non-space character in a line). It appears there are only trailing spaces in line 87. |
There was a problem hiding this comment.
Let's remove Java 8 since it's already end of life, so it's no longer supported.
@kennknowles do you know if Beam already supports Java 17? From the docs it looks like it's not supported yet.
There was a problem hiding this comment.
I personally use sdkman to install Java, it's a lot easier it install and it allows you to choose which vendor's SDK to install.
I believe their default choice is the Temurin flavor (not Oracle) since it's open source and production ready.
I would personally recommend this route since it's faster, easier, and the installation cannot go wrong.
# Install sdkman.
curl -s "https://get.sdkman.io" | bash
# Install Java 11.
sdk install java 11.0.12-temThere was a problem hiding this comment.
I copied this section from our existing quickstart.
Qs:
- Is it better to be agnostic about how customers install the JDK and Gradle/Maven? My assumption was anyone using Java already has a preference. OTOH your approach gives customers definite steps to follow.
- If we show sdkman, will we have to keep the version # up-to-date?
There was a problem hiding this comment.
I've gone through the manual installs and they're all pretty bad. The instructions are not consistent and it's easy to get something wrong (like not setting JAVA_HOME). Maven specifically has pretty bad documentation on how to install, Gradle isn't as bad.
I think it's best to give an opinionated approach to install them, especially since it's so much easier. We don't have to worry about keeping versions up to date, sdkman takes care of that. The only thing we have to make sure is that people install a compatible Java version (which I think it's currently only Java 11?).
If they're already using Java and already have a Java development environment set up, they can safely skip those steps. They're there mostly for people who don't have it ready. We can say something like "If you don't have Java installed, a simple way to install it is with sdkman", or something along those lines. What do you think?
There was a problem hiding this comment.
That makes sense. I rewrote this section to use sdkman. (It's definitely simpler!)
|
Overall it's looking great! I made some questions and minor comments, but other than that it looks great! Thank you! |
pcoet
left a comment
There was a problem hiding this comment.
This looks great! Just left a few optional suggestions LGTM.
|
R: @lukecwik |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
kennknowles
left a comment
There was a problem hiding this comment.
Checked out http://apache-beam-website-pull-requests.storage.googleapis.com/22747/index.html and it looks pretty good. Just two minor formatting things.
There was a problem hiding this comment.
These highlight blocks have newlines before and after the listing making it look funny. Can they be removed?
There was a problem hiding this comment.
Maybe changing them to backtick blocks ``` would help? Maybe the {{< highlight >}} tag includes the newlines kind of like how <code> tags in HTML work?
There was a problem hiding this comment.
If you mean in the rendered page, that seems to be the built-in styling (e.g. compare https://beam.apache.org/get-started/quickstart-java/#get-the-example-code)
There was a problem hiding this comment.
Looking at the staged page
it looks like the backtick blocks ``` do remove the extra spaces, but the "copy contents" button at the top right disappear.
I don't think it's a big deal having the extra spaces. One thing to try could be having everything in the same line, but that would make the markdown a lot uglier.
-- Instead of
{{< highlight >}}
code here
{{< highlight >}}
-- Would be something like this
{{< highlight >}}code here{{< highlight >}}
I suspect it might be parsing the tags like HTML tags. That could be a workaround but it could be pretty ugly. I'm okay with having the extra spaces and having cleaner code. What are your thoughts on it?
There was a problem hiding this comment.
my $0.02: The existing docs also render like this, and use the same markup, so I'd vote to keep it this way for consistency. (Seems like an issue with the highlight.html shortcode rather than the markup in the doc.)
There was a problem hiding this comment.
Yeah, no problem. Sounds good to me.
There was a problem hiding this comment.
@davidcavazos Is there anything else needed on this PR or is it OK to merge?
There was a problem hiding this comment.
I think it's good to merge. This is great, thank you!
|
Hi @kennknowles, this PR seems to be either ready to merge or very close. Are there any other comments on your side or are we good to merge? Thanks! |
kennknowles
left a comment
There was a problem hiding this comment.
Needs to resolve conflicts then g2g
25f9c54 to
e681045
Compare
Done! |
|
@pabloem @damccorm Can one of you help us merge this? We were waiting on approval from @kennknowles, and he signed off. @VeronicaWasson just fixed the outstanding merge conflict. Thanks! |
|
Thanks @damccorm! And thanks all! |
Adds a new quickstart for Java based on https://github.com/apache/beam-starter-java
This PR keeps the the original Java quickstart but renames it to "WordCount sample for Java"
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.