Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9436dce
Add context param
adarshsanjeev May 12, 2025
de73b08
Add new interface and move GetQueries API to SqlResource
adarshsanjeev May 13, 2025
c34cd52
Move cancelQueries API to SqlResource
adarshsanjeev May 13, 2025
45290cd
Move post API to SqlResource
adarshsanjeev May 14, 2025
c0df2bf
Fix broken resource tests
adarshsanjeev May 14, 2025
e126803
Cleanup
adarshsanjeev May 16, 2025
6bb211c
Merge remote-tracking branch 'origin/master' into dart-resource-depre…
adarshsanjeev May 16, 2025
4ed8445
Cleanup
adarshsanjeev May 16, 2025
fa85dc7
Merge remote-tracking branch 'origin/master' into dart-resource-depre…
adarshsanjeev May 20, 2025
2808af9
Remove Engine enum
adarshsanjeev May 20, 2025
db80843
Merge remote-tracking branch 'origin/master' into dart-resource-depre…
adarshsanjeev May 20, 2025
8fac1d8
Refactor
adarshsanjeev May 20, 2025
7a3e5a2
Merge QueryManager with SqlEngine
adarshsanjeev May 20, 2025
b8790b2
Remove sleep
adarshsanjeev May 20, 2025
36d31db
Fix ALL the tests
adarshsanjeev May 20, 2025
33478ec
Fix the other tests
adarshsanjeev May 20, 2025
2d558d4
Fix checkstyle
adarshsanjeev May 20, 2025
69360d1
Move tests out of msq
adarshsanjeev May 21, 2025
231d285
Fix ITs
adarshsanjeev May 21, 2025
a1b5dea
Final cleanup
adarshsanjeev May 21, 2025
10d9341
Merge remote-tracking branch 'origin/master' into dart-resource-depre…
adarshsanjeev May 28, 2025
0bf5774
Address review comments
adarshsanjeev May 28, 2025
5b6a014
Address review comments
adarshsanjeev May 28, 2025
93b2ba9
Address review comments
adarshsanjeev May 28, 2025
4f13bb7
Fix IT
adarshsanjeev May 29, 2025
c2ad513
Tidy up and add javadocs
adarshsanjeev May 30, 2025
f101e37
Address review comments
adarshsanjeev May 31, 2025
992aea7
Merge remote-tracking branch 'origin/master' into dart-resource-depre…
adarshsanjeev May 31, 2025
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
5 changes: 5 additions & 0 deletions extensions-core/multi-stage-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@
<artifactId>commons-io</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>provided</scope>
</dependency>

<!-- Tests -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
package org.apache.druid.msq.dart;

import com.google.common.collect.ImmutableList;
import org.apache.druid.msq.dart.controller.http.DartSqlResource;
import org.apache.druid.msq.dart.worker.http.DartWorkerResource;
import org.apache.druid.msq.rpc.ResourcePermissionMapper;
import org.apache.druid.msq.rpc.WorkerResource;
import org.apache.druid.server.security.Action;
import org.apache.druid.server.security.Resource;
import org.apache.druid.server.security.ResourceAction;
import org.apache.druid.sql.http.SqlResource;

import java.util.List;

public class DartResourcePermissionMapper implements ResourcePermissionMapper
{
/**
* Permissions for admin APIs in {@link DartWorkerResource} and {@link WorkerResource}. Note that queries from
* end users go through {@link DartSqlResource}, which wouldn't use these mappings.
* end users go through {@link SqlResource}, which wouldn't use these mappings.
*/
@Override
public List<ResourceAction> getAdminPermissions()
Expand All @@ -47,7 +47,7 @@ public List<ResourceAction> getAdminPermissions()

/**
* Permissions for per-query APIs in {@link DartWorkerResource} and {@link WorkerResource}. Note that queries from
* end users go through {@link DartSqlResource}, which wouldn't use these mappings.
* end users go through {@link SqlResource}, which wouldn't use these mappings.
*/
@Override
public List<ResourceAction> getQueryPermissions(String queryId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
import org.apache.druid.msq.util.MSQTaskQueryMakerUtils;
import org.apache.druid.query.QueryContexts;
import org.apache.druid.server.DruidNode;
import org.apache.druid.sql.http.GetQueriesResponse;
import org.apache.druid.sql.http.QueryInfo;
import org.joda.time.DateTime;

import java.util.Objects;

/**
* Class included in {@link GetQueriesResponse}.
*/
public class DartQueryInfo
public class DartQueryInfo implements QueryInfo
{
private final String sqlQueryId;
private final String dartQueryId;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
package org.apache.druid.msq.dart.controller.sql;

import com.google.common.util.concurrent.ListenableFuture;
import org.apache.druid.msq.dart.controller.http.DartSqlResource;
import org.apache.druid.msq.dart.controller.http.GetQueriesResponse;
import org.apache.druid.sql.http.GetQueriesResponse;
import org.apache.druid.sql.http.SqlResource;

import javax.servlet.http.HttpServletRequest;

/**
* Client for the {@link DartSqlResource} resource.
* Client for the {@link SqlResource} resource for Dart queries.
*/
public interface DartSqlClient
{
Expand All @@ -36,7 +36,7 @@ public interface DartSqlClient
* @param selfOnly true if only queries from this server should be returned; false if queries from all servers
* should be returned
*
* @see DartSqlResource#doGetRunningQueries(String, HttpServletRequest) the server side
* @see SqlResource#doGetRunningQueries(String, HttpServletRequest) the server side
*/
ListenableFuture<GetQueriesResponse> getRunningQueries(boolean selfOnly);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
import org.apache.druid.guice.annotations.EscalatedGlobal;
import org.apache.druid.guice.annotations.Json;
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.msq.dart.controller.http.DartSqlResource;
import org.apache.druid.rpc.FixedServiceLocator;
import org.apache.druid.rpc.ServiceClient;
import org.apache.druid.rpc.ServiceClientFactory;
import org.apache.druid.rpc.ServiceLocation;
import org.apache.druid.rpc.StandardRetryPolicy;
import org.apache.druid.server.DruidNode;
import org.apache.druid.sql.http.SqlResource;

/**
* Production implementation of {@link DartSqlClientFactory}.
Expand All @@ -55,7 +55,7 @@ public DartSqlClient makeClient(DruidNode node)
{
final ServiceClient client = clientFactory.makeClient(
StringUtils.format("%s[dart-sql]", node.getHostAndPortToUse()),
new FixedServiceLocator(ServiceLocation.fromDruidNode(node).withBasePath(DartSqlResource.PATH)),
new FixedServiceLocator(ServiceLocation.fromDruidNode(node).withBasePath(SqlResource.PATH)),
StandardRetryPolicy.noRetries()
);

Expand Down
Loading
Loading