Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Palis <jpalis@amazon.com>
  • Loading branch information
joshpalis committed Mar 30, 2023
1 parent de4b1bb commit 0e53941
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public class ExtensionsRunner {
new ExtensionsIndicesModuleNameRequestHandler();
private final ExtensionsRestRequestHandler extensionsRestRequestHandler = new ExtensionsRestRequestHandler(extensionRestPathRegistry);
private final ExtensionActionRequestHandler extensionsActionRequestHandler;
private final List<ExecutorBuilder<?>> executorBuilders;
private final AtomicReference<RunnableTaskExecutionListener> runnableTaskListener;
private final IndexNameExpressionResolver indexNameExpressionResolver;

Expand Down Expand Up @@ -183,7 +184,7 @@ protected ExtensionsRunner(Extension extension) throws IOException {
.put(TransportSettings.PORT.getKey(), extensionSettings.getHostPort())
.build();

final List<ExecutorBuilder<?>> executorBuilders = extension.getExecutorBuilders(settings);
this.executorBuilders = extension.getExecutorBuilders(settings);

runnableTaskListener = new AtomicReference<>();
this.threadPool = new ThreadPool(settings, runnableTaskListener, executorBuilders.toArray(new ExecutorBuilder[0]));
Expand Down Expand Up @@ -214,11 +215,11 @@ protected ExtensionsRunner(Extension extension) throws IOException {
modules.add(b -> {
b.bind(ExtensionsRunner.class).toInstance(this);
b.bind(Extension.class).toInstance(extension);
b.bind(IndexNameExpressionResolver.class).toInstance(indexNameExpressionResolver);

b.bind(SDKNamedXContentRegistry.class).toInstance(getNamedXContentRegistry());
b.bind(ThreadPool.class).toInstance(getThreadPool());
b.bind(TaskManager.class).toInstance(getTaskManager());
b.bind(IndexNameExpressionResolver.class).toInstance(indexNameExpressionResolver);

b.bind(SDKClient.class).toInstance(getSdkClient());
b.bind(SDKClusterService.class).toInstance(getSdkClusterService());
Expand Down

0 comments on commit 0e53941

Please sign in to comment.