From 50669ebe3a0cb46ff832d75f77adb23672725777 Mon Sep 17 00:00:00 2001 From: Peng Huo Date: Thu, 24 Nov 2022 18:38:09 -0800 Subject: [PATCH] Support opensearch-sql:run and update developer_guide doc (#1099) Support opensearch-sql:run Update developer_guide doc. add prometheus and filesystem description. Add .java-version to .gitignore Signed-off-by: Peng Huo --- .gitignore | 2 ++ DEVELOPER_GUIDE.rst | 4 ++++ plugin/build.gradle | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/.gitignore b/.gitignore index 851d42e0ee..67e5bb07e9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ gen /artifacts/ /.pid.lock /.prom.pid.lock + +.java-version diff --git a/DEVELOPER_GUIDE.rst b/DEVELOPER_GUIDE.rst index 7029388085..bf9e603930 100644 --- a/DEVELOPER_GUIDE.rst +++ b/DEVELOPER_GUIDE.rst @@ -141,6 +141,8 @@ The plugin codebase is in standard layout of Gradle project:: ├── core ├── doctest ├── opensearch + ├── filesystem + ├── prometheus ├── integ-test ├── legacy ├── plugin @@ -159,6 +161,8 @@ Here are sub-folders (Gradle modules) for plugin source code: - ``ppl``: PPL language processor. - ``core``: core query engine. - ``opensearch``: OpenSearch storage engine. +- ``prometheus``: Prometheus storage engine. +- ``filesystem``: File System storage engine (in development). - ``protocol``: request/response protocol formatter. - ``common``: common util code. - ``integ-test``: integration and comparison test. diff --git a/plugin/build.gradle b/plugin/build.gradle index 4754292216..d2bdb87275 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -30,6 +30,7 @@ plugins { } apply plugin: 'opensearch.pluginzip' +apply plugin: 'opensearch.rest-test' ext { projectSubstitutions = [:] @@ -226,3 +227,19 @@ afterEvaluate { } } } + +testClusters.integTest { + plugin(project.tasks.bundlePlugin.archiveFile) + + // debug with command, ./gradlew opensearch-sql:run -DdebugJVM. --debug-jvm does not work with keystore. + if (System.getProperty("debugJVM") != null) { + jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' + } + + // add customized keystore + keystore 'plugins.query.federation.datasources.config', new File("$projectDir/src/test/resources/", 'datasources.json') +} + +run { + useCluster testClusters.integTest +}