From 95ca0a9f5d2d955f2cfee4bb92e5e0cc24c62b3c Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Wed, 17 Jul 2024 16:41:09 +0000 Subject: [PATCH] cleanup --- .../msq/exec/MSQDrillWindowQueryTest.java | 48 ++----------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java index 96e75f5b729..fda8c1a669c 100644 --- a/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java +++ b/extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQDrillWindowQueryTest.java @@ -55,9 +55,7 @@ import org.apache.druid.server.security.AuthorizerMapper; import org.apache.druid.server.security.Escalator; import org.apache.druid.sql.SqlStatementFactory; import org.apache.druid.sql.SqlToolbox; -import org.apache.druid.sql.avatica.AvaticaServerConfig; import org.apache.druid.sql.avatica.DruidMeta; -import org.apache.druid.sql.avatica.ErrorHandler; import org.apache.druid.sql.calcite.DrillWindowQueryTest; import org.apache.druid.sql.calcite.QueryTestBuilder; import org.apache.druid.sql.calcite.SqlTestFrameworkConfig; @@ -153,30 +151,12 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper); } - -// @Override -// public void configure(Binder binder) -// { -// binder.bind(DruidMeta.class).to(MSQDruidMeta.class).in(LazySingleton.class); -// } - -@Provides -@LazySingleton -public DruidMeta createMeta( - MSQDruidMeta druidMeta) -{ - return druidMeta; -} - -// @Provides + @Provides @LazySingleton public DruidMeta createMeta( - final @MultiStageQuery SqlStatementFactory sqlStatementFactory, - final AvaticaServerConfig config, - final ErrorHandler errorHandler, - final AuthenticatorMapper authMapper) + MSQDruidMeta druidMeta) { - return new MSQDruidMeta(sqlStatementFactory, config, errorHandler, authMapper); + return druidMeta; } } @@ -187,27 +167,7 @@ public DruidMeta createMeta( Injector injector ) { - if(true) { - return injector.getInstance(MSQTaskSqlEngine.class); - } else { - final WorkerMemoryParameters workerMemoryParameters = - WorkerMemoryParameters.createInstance( - WorkerMemoryParameters.PROCESSING_MINIMUM_BYTES * 50, - 2, - 10, - 2, - 0, - 0 - ); - final MSQTestOverlordServiceClient indexingServiceClient = new MSQTestOverlordServiceClient( - queryJsonMapper, - injector, - new MSQTestTaskActionClient(queryJsonMapper, injector), - workerMemoryParameters, - ImmutableList.of() - ); - return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper); - } + return injector.getInstance(MSQTaskSqlEngine.class); } }