Skip to content

Commit 9431ac6

Browse files
authored
Update developer guide (#4128)
Signed-off-by: Tomoyuki Morita <moritato@amazon.com>
1 parent 9c09a02 commit 9431ac6

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

DEVELOPER_GUIDE.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Prerequisites
1717
JDK
1818
---
1919

20-
OpenSearch builds using Java 11 at a minimum and supports JDK 11, 14 and 17. This means you must have a JDK of supported version installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation::
20+
OpenSearch SQL plugin requires Java 21 for development and runtime. This means you must have JDK 21 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation::
2121

2222
$ echo $JAVA_HOME
23-
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
23+
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
2424

2525
$ java -version
26-
openjdk version "11.0.1" 2018-10-16
27-
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
28-
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
26+
openjdk version "21.0.8" 2024-07-16 LTS
27+
OpenJDK Runtime Environment (build 21.0.8+13-LTS)
28+
OpenJDK 64-Bit Server VM (build 21.0.8+13-LTS, mixed mode, sharing)
2929

3030
Here are the official instructions on how to set ``JAVA_HOME`` for different platforms: https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/.
3131

@@ -78,12 +78,12 @@ You can develop the plugin in your favorite IDEs such as Eclipse and IntelliJ ID
7878
Java Language Level
7979
-------------------
8080

81-
Although later version of JDK is required to build the plugin, the Java language level needs to be Java 8 for compatibility. Only in this case your plugin works with OpenSearch running against JDK 8. Otherwise it will raise runtime exception when executing new API from new JDK. In case your IDE doesnt set it right, you may want to double check your project setting after import.
81+
The plugin requires Java 21 for both development and runtime. Make sure your IDE is configured to use Java 21 as the project SDK and language level. In case your IDE doesn't set it right, you may want to double check your project setting after import.
8282

8383
Remote Debugging
8484
----------------
8585

86-
Firstly you need to add the following configuration to the JVM used by your IDE. For Intellij IDEA, it should be added to ``<OpenSearch installation>/config/jvm.options`` file. After configuring this, an agent in JVM will listen on the port when your OpenSearch bootstraps and wait for IDE debugger to connect. So you should be able to debug by setting up a Remote Run/Debug Configuration::
86+
Firstly you need to add the following configuration to the JVM used by your IDE. For Intellij IDEA, it should be added to ``<OpenSearch installation>/config/jvm.options`` file. After configuring this, an agent in JVM will listen on the port when your OpenSearch bootstraps and wait for IDE debugger to connect. So you should be able to debug by setting up a "Remote Run/Debug Configuration"::
8787

8888
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
8989

@@ -94,7 +94,7 @@ running.
9494

9595
./gradlew opensearch-sql:run -DdebugJVM
9696

97-
To connect to the cluster with the debugger in an IDE, youll need to
97+
To connect to the cluster with the debugger in an IDE, you'll need to
9898
connect to that port. For IntelliJ, see `attaching to a remote process <https://www.jetbrains.com/help/idea/attach-to-process.html#attach-to-remote>`_.
9999

100100
License Header
@@ -138,10 +138,10 @@ The plugin codebase is in standard layout of Gradle project::
138138
├── build.gradle
139139
├── config
140140
├── docs
141-
   ├── attributions.md
142-
   ├── category.json
143-
   ├── dev
144-
   └── user
141+
├── attributions.md
142+
├── category.json
143+
├── dev
144+
└── user
145145
├── gradle.properties
146146
├── gradlew
147147
├── gradlew.bat
@@ -273,7 +273,7 @@ Building and Running Tests
273273
Gradle Build
274274
------------
275275

276-
Most of the time you just need to run ./gradlew build which will make sure you pass all checks and testing. While youre developing, you may want to run specific Gradle task only. In this case, you can run ./gradlew with task name which only triggers the task along with those it depends on. Here is a list for common tasks:
276+
Most of the time you just need to run ./gradlew build which will make sure you pass all checks and testing. While you're developing, you may want to run specific Gradle task only. In this case, you can run ./gradlew with task name which only triggers the task along with those it depends on. Here is a list for common tasks:
277277

278278
.. list-table::
279279
:widths: 30 50
@@ -304,7 +304,7 @@ Most of the time you just need to run ./gradlew build which will make sure you p
304304
* - ./gradlew spotlessApply
305305
- Automatically apply spotless code style changes.
306306

307-
For integration test, you can use ``-Dtests.class`` UT full path to run a task individually. For example ``./gradlew :integ-test:integTest -Dtests.class="*QueryIT"``.
307+
For integration test, you can use ``-Dtests.class`` "UT full path" to run a task individually. For example ``./gradlew :integ-test:integTest -Dtests.class="*QueryIT"``.
308308

309309
To run the task above for specific module, you can do ``./gradlew :<module_name>:task``. For example, only build core module by ``./gradlew :core:build``.
310310

0 commit comments

Comments
 (0)