Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -183,24 +183,10 @@ repositories {
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
}

configurations {
all {
resolutionStrategy {
force 'com.google.guava:guava:32.1.3-jre'
}
}
}

dependencies {
implementation project(path: ":${rootProject.name}-spi", configuration: 'shadow')
implementation group: 'com.google.guava', name: 'guava', version:'32.1.3-jre'
Copy link
Member

Choose a reason for hiding this comment

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

I think the whole section above this can go too:

configurations {
    all {
        resolutionStrategy {
            force 'com.google.guava:guava:32.1.3-jre'
        }
    }
}

Also what about the section below?

    //spotless
    implementation('com.google.googlejavaformat:google-java-format:1.26.0') {
        exclude group: 'com.google.guava'
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I am removing them as well.

implementation group: 'com.google.guava', name: 'failureaccess', version:'1.0.3'
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}"
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
//spotless
implementation('com.google.googlejavaformat:google-java-format:1.26.0') {
exclude group: 'com.google.guava'
}

opensearchPlugin "org.opensearch.plugin:opensearch-security:${security_plugin_version}@zip"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
import java.util.ArrayList;
import java.util.function.Supplier;

import com.google.common.collect.ImmutableList;

public class JobSchedulerPlugin extends Plugin implements ActionPlugin, ExtensiblePlugin, SystemIndexPlugin {

public static final String OPEN_DISTRO_JOB_SCHEDULER_THREAD_POOL_NAME = "open_distro_job_scheduler";
Expand Down Expand Up @@ -247,7 +245,7 @@ public List getRestHandlers(
RestGetJobDetailsAction restGetJobDetailsAction = new RestGetJobDetailsAction(jobDetailsService);
RestGetLockAction restGetLockAction = new RestGetLockAction(lockService);
RestReleaseLockAction restReleaseLockAction = new RestReleaseLockAction(lockService);
return ImmutableList.of(restGetJobDetailsAction, restGetLockAction, restReleaseLockAction);
return List.of(restGetJobDetailsAction, restGetLockAction, restReleaseLockAction);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import com.google.common.collect.ImmutableList;
import org.opensearch.transport.client.node.NodeClient;

import static org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken;
Expand Down Expand Up @@ -60,7 +59,7 @@ public String getName() {

@Override
public List<Route> routes() {
return ImmutableList.of(
return List.of(
// New Job Details Entry Request
new Route(PUT, String.format(Locale.ROOT, "%s/%s", JobSchedulerPlugin.JS_BASE_URI, "_job_details")),
// Update Job Details Entry Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.concurrent.CompletionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import com.google.common.collect.ImmutableList;
import org.opensearch.transport.client.node.NodeClient;

import static org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken;
Expand All @@ -60,7 +59,7 @@ public String getName() {

@Override
public List<Route> routes() {
return ImmutableList.of(new Route(GET, String.format(Locale.ROOT, "%s/%s", JobSchedulerPlugin.JS_BASE_URI, "_lock")));
return List.of(new Route(GET, String.format(Locale.ROOT, "%s/%s", JobSchedulerPlugin.JS_BASE_URI, "_lock")));
}

@VisibleForTesting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
package org.opensearch.jobscheduler.rest.action;

import com.google.common.collect.ImmutableList;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
Expand Down Expand Up @@ -50,7 +49,7 @@ public String getName() {

@Override
public List<Route> routes() {
return ImmutableList.of(
return List.of(
new Route(PUT, String.format(Locale.ROOT, "%s/%s/{%s}", JobSchedulerPlugin.JS_BASE_URI, "_release_lock", LockModel.LOCK_ID))
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
package org.opensearch.jobscheduler.multinode;

import com.google.common.collect.ImmutableMap;
import java.util.Map;
import org.opensearch.client.Response;
import org.opensearch.jobscheduler.ODFERestTestCase;
Expand Down Expand Up @@ -37,7 +36,7 @@ public void testGetJobDetailsRestAPI() throws Exception {
client(),
"PUT",
TestHelpers.GET_JOB_DETAILS_BASE_URI,
ImmutableMap.of(),
Map.of(),
TestHelpers.toHttpEntity(initialRequestBody),
null
);
Expand All @@ -50,7 +49,7 @@ public void testGetJobDetailsRestAPI() throws Exception {
client(),
"PUT",
TestHelpers.GET_JOB_DETAILS_BASE_URI,
ImmutableMap.of(GetJobDetailsRequest.DOCUMENT_ID, expectedDocumentId),
Map.of(GetJobDetailsRequest.DOCUMENT_ID, expectedDocumentId),
TestHelpers.toHttpEntity(updatedRequestBody),
null
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.opensearch.jobscheduler.multinode;

import java.io.IOException;
import java.util.Map;

import org.junit.Before;
import org.opensearch.client.Response;
Expand All @@ -21,8 +22,6 @@
import org.opensearch.jobscheduler.transport.AcquireLockResponse;
import org.opensearch.test.OpenSearchIntegTestCase;

import com.google.common.collect.ImmutableMap;

@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2)
public class GetLockMultiNodeRestIT extends ODFERestTestCase {

Expand All @@ -41,7 +40,7 @@ public void setUp() throws Exception {
client(),
"GET",
TestHelpers.GET_LOCK_BASE_URI,
ImmutableMap.of(),
Map.of(),
TestHelpers.toHttpEntity(TestHelpers.generateAcquireLockRequestBody(this.initialJobIndexName, this.initialJobId)),
null
);
Expand All @@ -59,7 +58,7 @@ public void testGetLockRestAPI() throws Exception {
client(),
"GET",
TestHelpers.GET_LOCK_BASE_URI,
ImmutableMap.of(),
Map.of(),
TestHelpers.toHttpEntity(TestHelpers.generateAcquireLockRequestBody(String.valueOf(i), String.valueOf(i))),
null
);
Expand All @@ -68,7 +67,7 @@ public void testGetLockRestAPI() throws Exception {
client(),
"PUT",
TestHelpers.RELEASE_LOCK_BASE_URI + "/" + expectedLockId,
ImmutableMap.of(),
Map.of(),
null,
null
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
package org.opensearch.jobscheduler.multinode;

import com.google.common.collect.ImmutableMap;
import java.util.Map;
import org.junit.Before;
import org.opensearch.client.Response;
Expand All @@ -33,7 +32,7 @@ public void setUp() throws Exception {
client(),
"GET",
TestHelpers.GET_LOCK_BASE_URI,
ImmutableMap.of(),
Map.of(),
TestHelpers.toHttpEntity(TestHelpers.generateAcquireLockRequestBody(initialJobIndexName, initialJobId)),
null
);
Expand All @@ -46,7 +45,7 @@ public void testReleaseLockRestAPI() throws Exception {
client(),
"PUT",
TestHelpers.RELEASE_LOCK_BASE_URI + "/" + TestHelpers.generateExpectedLockId(initialJobIndexName, initialJobId),
ImmutableMap.of(),
Map.of(),
null,
null
);
Expand Down
Loading