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
2 changes: 2 additions & 0 deletions web-console/script/druid
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function _build_distribution() {
&& echo -e "\n\ndruid.server.http.allowedHttpMethods=[\"HEAD\"]" >> conf/druid/auto/_common/common.runtime.properties \
&& echo -e "\n\ndruid.export.storage.baseDir=/" >> conf/druid/auto/_common/common.runtime.properties \
&& echo -e "\n\ndruid.msq.dart.enabled=true" >> conf/druid/auto/_common/common.runtime.properties \
&& echo -e "\n\ndruid.msq.dart.controller.maxRetainedReportCount=100" >> conf/druid/auto/_common/common.runtime.properties \
&& echo -e "\n\ndruid.msq.dart.controller.maxRetainedReportDuration=PT3600S" >> conf/druid/auto/_common/common.runtime.properties \
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const QUERY_CONTEXT_COMPLETIONS: JsonCompletionRule[] = [
{ value: 'forceSegmentSortByTime', documentation: 'Force segments to be sorted by time' },
{ value: 'includeAllCounters', documentation: 'Include all counters in task reports' },
// SQL specific
{ value: 'sqlQueryId', documentation: 'Query ID for SQL queries' },
{ value: 'sqlTimeZone', documentation: 'Time zone for SQL queries' },
{ value: 'useApproximateCountDistinct', documentation: 'Use approximate COUNT DISTINCT' },
{ value: 'useApproximateTopN', documentation: 'Use approximate TOP N queries' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
workerId: 'query-346b9ac6-4912-46e4-9b98-75f11071af87-worker0_0',
state: 'SUCCESS',
durationMs: 8789,
pendingMs: 123,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
workerId: 'query-26d490c6-c06d-4cd2-938f-bc5f7f982754-worker0_0',
state: 'FAILED',
durationMs: -1,
pendingMs: -1,
},
],
},
Expand Down
18 changes: 16 additions & 2 deletions web-console/src/druid-models/execution/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,18 @@ export class Execution {

static getProgressDescription(execution: Execution | undefined): string {
if (!execution?.stages) return 'Loading...';
if (!execution.isWaitingForQuery())
return 'Query complete, waiting for segments to be loaded...';
if (!execution.isWaitingForQuery()) {
switch (execution.engine) {
case 'sql-msq-task':
return 'Query complete, waiting for segments to be loaded...';

case 'sql-msq-dart':
return 'Got a non-running report. Did you reuse a sqlQueryID?';

default:
return 'Query not running.';
}
}

let ret = execution.stages.getStage(0)?.phase ? 'Running query...' : 'Starting query...';
if (execution.usageInfo) {
Expand Down Expand Up @@ -556,6 +566,10 @@ export class Execution {
return status !== 'SUCCESS' && status !== 'FAILED';
}

public isWaitingForSegments(): boolean {
return Boolean(this.stages && !this.isWaitingForQuery() && this.engine === 'sql-msq-task');
}

public getSegmentStatusDescription() {
const { segmentStatus } = this;

Expand Down
1 change: 1 addition & 0 deletions web-console/src/druid-models/task/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface WorkerState {
workerId: string;
state: string;
durationMs: number;
pendingMs: number;
}

export interface SegmentLoadWaiterStatus {
Expand Down
Loading
Loading