some stuff

This commit is contained in:
Zoltan Haindrich 2024-07-17 15:48:36 +00:00
parent 42b3086512
commit f3cf778115
3 changed files with 5 additions and 33 deletions

View File

@ -31,7 +31,6 @@ import org.apache.druid.guice.annotations.NativeQuery;
import org.apache.druid.initialization.ServerInjectorBuilderTest.TestDruidModule;
import org.apache.druid.java.util.emitter.service.ServiceEmitter;
import org.apache.druid.msq.exec.MSQDrillWindowQueryTest.DrillWindowQueryMSQComponentSupplier;
import org.apache.druid.msq.guice.MSQSqlModule;
import org.apache.druid.msq.sql.MSQTaskSqlEngine;
import org.apache.druid.msq.test.CalciteMSQTestsHelper;
import org.apache.druid.msq.test.ExtractResultsFactory;
@ -71,9 +70,6 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
builder.addModule(new TestMSQSqlModule());
}
/**
* More or less {@link MSQSqlModule} but for tests.
*/
static class TestMSQSqlModule extends TestDruidModule {
@Provides
@ -112,16 +108,10 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
@Provides
@LazySingleton
public MSQTaskSqlEngine createEngine(
QueryLifecycleFactory qlf,
ObjectMapper queryJsonMapper,
MSQTestOverlordServiceClient indexingServiceClient
Injector injector
)
{
return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper);
}
@Provides
@LazySingleton
private MSQTestOverlordServiceClient createOverlordClient(ObjectMapper queryJsonMapper, Injector injector)
{
final WorkerMemoryParameters workerMemoryParameters =
WorkerMemoryParameters.createInstance(
@ -139,7 +129,7 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
workerMemoryParameters,
ImmutableList.of()
);
return indexingServiceClient;
return new MSQTaskSqlEngine(indexingServiceClient, queryJsonMapper);
}
}
@ -150,23 +140,7 @@ public class MSQDrillWindowQueryTest extends DrillWindowQueryTest
Injector injector
)
{
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);
}
}

View File

@ -10,7 +10,7 @@ order by 1;
+--------------------------------------------+
| TASK |
+--------------------------------------------+
| query-8f888fed-ca24-4f93-85bc-96ed1cb6b7da |
| query-6d06dbdc-17a4-44a6-82e9-a875564ee17f |
+--------------------------------------------+
(1 row)

View File

@ -51,8 +51,6 @@ public class SqlToolbox
)
{
this.engine = engine;
System.out.println("SqlToolbox.SqlToolbox");
System.out.println("engine = " + engine);
this.plannerFactory = plannerFactory;
this.emitter = emitter;
this.requestLogger = requestLogger;