generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 64
Add sample Hello World Scheduled Job #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cwperks
wants to merge
24
commits into
opensearch-project:main
Choose a base branch
from
cwperks:hello-world-job
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
5fb0ebc
Add sample Hello World Scheduled Job
cwperks 0afb4ba
Run spotlessApply
cwperks 14a35b9
Re-run CI
cwperks a5c6111
Use different artifact id
cwperks 09fb3e6
Add javadoc
cwperks c504122
Merge branch 'main' into hello-world-job
cwperks da40af0
WIP on multi-project
cwperks 60ce094
WIP on multi-project
cwperks 51a1dda
Fix TestHelloWorldExtension
cwperks a88ecdf
Merge branch 'main' into hello-world-job
cwperks 90fb2e7
Run spotlessApply
cwperks 7c03144
Temporarily add org.opensearch.plugin
cwperks 69862c3
Update build.gradle
cwperks 9dd7498
Merge branch 'main' into hello-world-job
cwperks 7b5378d
Remove extra line in sample/build.gradle
cwperks a2ce7ea
Merge branch 'main' into hello-world-job
cwperks 6ec38db
Merge branch 'main' into hello-world-job
cwperks b0babbd
Merge branch 'main' into hello-world-job
cwperks 9ca9844
Merge branch 'main' into hello-world-job
cwperks 0f42ca4
Run spotlessApply
cwperks 36bb945
Make guava api dependency
cwperks 1fb4296
Merge branch 'main' into hello-world-job
cwperks 20577ac
Update PR to incorporate NamedRoute change
cwperks 9f805c2
Run spotlessApply
cwperks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| ### IntelliJ IDEA ### | ||
| out/ | ||
| !**/src/main/**/out/ | ||
| !**/src/test/**/out/ | ||
|
|
||
| ### Eclipse ### | ||
| .apt_generated | ||
| .classpath | ||
| .factorypath | ||
| .project | ||
| .settings | ||
| .springBeans | ||
| .sts4-cache | ||
| bin/ | ||
| !**/src/main/**/bin/ | ||
| !**/src/test/**/bin/ | ||
|
|
||
| ### NetBeans ### | ||
| /nbproject/private/ | ||
| /nbbuild/ | ||
| /dist/ | ||
| /nbdist/ | ||
| /.nb-gradle/ | ||
|
|
||
| ### VS Code ### | ||
| .vscode/ | ||
|
|
||
| ### Mac OS ### | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| import org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestFramework | ||
|
|
||
| /* | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * The OpenSearch Contributors require contributions made to | ||
| * this file be licensed under the Apache-2.0 license or a | ||
| * compatible open source license. | ||
| * | ||
| * Modifications Copyright OpenSearch Contributors. See | ||
| * GitHub history for details. | ||
| */ | ||
|
|
||
| plugins { | ||
| id 'java' | ||
| id "com.diffplug.spotless" version "6.18.0" apply false | ||
| id 'jacoco' | ||
| id "com.form.diff-coverage" version "0.9.5" | ||
| // for javadocs and checks spotless doesn't do | ||
| id 'checkstyle' | ||
| } | ||
|
|
||
| ext { | ||
| projectSubstitutions = [:] | ||
| licenseFile = rootProject.file('LICENSE.txt') | ||
| noticeFile = rootProject.file('NOTICE.txt') | ||
| } | ||
|
|
||
|
|
||
| apply plugin: 'application' | ||
| apply plugin: 'maven-publish' | ||
|
|
||
| // Temporary to keep "gradle run" working | ||
| // TODO: change this to an extension designed for testing instead of duplicating a sample | ||
| // https://github.com/opensearch-project/opensearch-sdk-java/issues/175 | ||
| mainClassName = 'org.opensearch.sdk.sample.helloworld.HelloWorldExtension' | ||
|
|
||
|
|
||
| group 'org.opensearch.sdk.sample' | ||
| version '2.0.0-SNAPSHOT' | ||
|
|
||
| java { | ||
| withSourcesJar() | ||
| withJavadocJar() | ||
| } | ||
|
|
||
| publishing { | ||
| publications { | ||
| group = "${group}" | ||
| version = "${version}" | ||
| mavenJava(MavenPublication) { | ||
| from components.java | ||
| } | ||
| sourceCompatibility = 11 | ||
| targetCompatibility = 11 | ||
| } | ||
|
|
||
| repositories { | ||
| maven { | ||
| name = "Snapshots" // optional target repository name | ||
| url = "https://aws.oss.sonatype.org/content/repositories/snapshots" | ||
| credentials { | ||
| username "$System.env.SONATYPE_USERNAME" | ||
| password "$System.env.SONATYPE_PASSWORD" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| test { | ||
| getTestFrameworkProperty().convention(getProviderFactory().provider(() -> new JUnitPlatformTestFramework(it.getFilter(), false))) | ||
| jvmArgs '--enable-preview' | ||
| systemProperty 'tests.security.manager', 'false' | ||
| } | ||
|
|
||
| dependencies { | ||
| def opensearchVersion = "3.0.0-SNAPSHOT" | ||
| def jobSchedulerVersion = "3.0.0.0-SNAPSHOT" | ||
| def junit5Version = "5.9.3" | ||
| def junitPlatform = "1.9.3" | ||
|
|
||
| implementation project(':') | ||
| implementation("org.opensearch.plugin:opensearch-job-scheduler:${jobSchedulerVersion}") | ||
| implementation("org.opensearch:opensearch-job-scheduler:${jobSchedulerVersion}") | ||
| implementation("org.opensearch:opensearch-job-scheduler-spi:${jobSchedulerVersion}") | ||
|
|
||
| testImplementation project(':').sourceSets.test.output | ||
| testImplementation("org.junit.jupiter:junit-jupiter-api:${junit5Version}") | ||
| testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junit5Version}") | ||
| testImplementation("org.opensearch.test:framework:${opensearchVersion}") | ||
| testRuntimeOnly("org.junit.platform:junit-platform-launcher:${junitPlatform}") | ||
| } | ||
|
|
||
| // this task runs the helloworld sample extension | ||
| task helloWorld(type: JavaExec) { | ||
| group = 'Execution' | ||
| description = 'Run HelloWorld Extension.' | ||
| mainClass = 'org.opensearch.sdk.sample.helloworld.HelloWorldExtension' | ||
| classpath = sourceSets.main.runtimeClasspath | ||
| } | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.