mirror of https://github.com/apache/druid.git
Web console: Page downloader, and fix JSON error resetting (#14712)
* fix error reset * add page dialog logic * add to detail archive * update tests * fix plurals * use jsonl ext * fix regex issue
This commit is contained in:
parent
174053f4fd
commit
4a31ae26f4
|
@ -67,7 +67,7 @@ interface InternalValue {
|
||||||
interface JsonInputProps {
|
interface JsonInputProps {
|
||||||
value: any;
|
value: any;
|
||||||
onChange: (value: any) => void;
|
onChange: (value: any) => void;
|
||||||
onError?: (error: Error) => void;
|
setError?: (error: Error | undefined) => void;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
focus?: boolean;
|
focus?: boolean;
|
||||||
width?: string;
|
width?: string;
|
||||||
|
@ -76,7 +76,7 @@ interface JsonInputProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const JsonInput = React.memo(function JsonInput(props: JsonInputProps) {
|
export const JsonInput = React.memo(function JsonInput(props: JsonInputProps) {
|
||||||
const { onChange, onError, placeholder, focus, width, height, value, issueWithValue } = props;
|
const { onChange, setError, placeholder, focus, width, height, value, issueWithValue } = props;
|
||||||
const [internalValue, setInternalValue] = useState<InternalValue>(() => ({
|
const [internalValue, setInternalValue] = useState<InternalValue>(() => ({
|
||||||
value,
|
value,
|
||||||
stringified: stringifyJson(value),
|
stringified: stringifyJson(value),
|
||||||
|
@ -121,9 +121,8 @@ export const JsonInput = React.memo(function JsonInput(props: JsonInputProps) {
|
||||||
stringified: inputJson,
|
stringified: inputJson,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (error) {
|
setError?.(error);
|
||||||
onError?.(error);
|
if (!error) {
|
||||||
} else {
|
|
||||||
onChange(value);
|
onChange(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,13 @@ export const CompactionConfigDialog = React.memo(function CompactionConfigDialog
|
||||||
</p>
|
</p>
|
||||||
</Callout>
|
</Callout>
|
||||||
)}
|
)}
|
||||||
<FormJsonSelector tab={currentTab} onChange={setCurrentTab} />
|
<FormJsonSelector
|
||||||
|
tab={currentTab}
|
||||||
|
onChange={t => {
|
||||||
|
setJsonError(undefined);
|
||||||
|
setCurrentTab(t);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<div className="content">
|
<div className="content">
|
||||||
{currentTab === 'form' ? (
|
{currentTab === 'form' ? (
|
||||||
<AutoForm
|
<AutoForm
|
||||||
|
@ -98,11 +104,8 @@ export const CompactionConfigDialog = React.memo(function CompactionConfigDialog
|
||||||
) : (
|
) : (
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={currentConfig}
|
value={currentConfig}
|
||||||
onChange={v => {
|
onChange={setCurrentConfig}
|
||||||
setCurrentConfig(v);
|
setError={setJsonError}
|
||||||
setJsonError(undefined);
|
|
||||||
}}
|
|
||||||
onError={setJsonError}
|
|
||||||
issueWithValue={value => AutoForm.issueWithModel(value, COMPACTION_CONFIG_FIELDS)}
|
issueWithValue={value => AutoForm.issueWithModel(value, COMPACTION_CONFIG_FIELDS)}
|
||||||
height="100%"
|
height="100%"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -114,7 +114,13 @@ export const CoordinatorDynamicConfigDialog = React.memo(function CoordinatorDyn
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
<FormJsonSelector tab={currentTab} onChange={setCurrentTab} />
|
<FormJsonSelector
|
||||||
|
tab={currentTab}
|
||||||
|
onChange={t => {
|
||||||
|
setJsonError(undefined);
|
||||||
|
setCurrentTab(t);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{currentTab === 'form' ? (
|
{currentTab === 'form' ? (
|
||||||
<AutoForm
|
<AutoForm
|
||||||
fields={COORDINATOR_DYNAMIC_CONFIG_FIELDS}
|
fields={COORDINATOR_DYNAMIC_CONFIG_FIELDS}
|
||||||
|
@ -125,11 +131,8 @@ export const CoordinatorDynamicConfigDialog = React.memo(function CoordinatorDyn
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={dynamicConfig}
|
value={dynamicConfig}
|
||||||
height="50vh"
|
height="50vh"
|
||||||
onChange={v => {
|
onChange={setDynamicConfig}
|
||||||
setDynamicConfig(v);
|
setError={setJsonError}
|
||||||
setJsonError(undefined);
|
|
||||||
}}
|
|
||||||
onError={setJsonError}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -50,22 +50,25 @@ export const IndexSpecDialog = React.memo(function IndexSpecDialog(props: IndexS
|
||||||
canOutsideClickClose={false}
|
canOutsideClickClose={false}
|
||||||
title={title ?? 'Index spec'}
|
title={title ?? 'Index spec'}
|
||||||
>
|
>
|
||||||
<FormJsonSelector tab={currentTab} onChange={setCurrentTab} />
|
<FormJsonSelector
|
||||||
|
tab={currentTab}
|
||||||
|
onChange={t => {
|
||||||
|
setJsonError(undefined);
|
||||||
|
setCurrentTab(t);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<div className="content">
|
<div className="content">
|
||||||
{currentTab === 'form' ? (
|
{currentTab === 'form' ? (
|
||||||
<AutoForm
|
<AutoForm
|
||||||
fields={INDEX_SPEC_FIELDS}
|
fields={INDEX_SPEC_FIELDS}
|
||||||
model={currentIndexSpec}
|
model={currentIndexSpec}
|
||||||
onChange={m => setCurrentIndexSpec(m)}
|
onChange={setCurrentIndexSpec}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={currentIndexSpec}
|
value={currentIndexSpec}
|
||||||
onChange={v => {
|
onChange={setCurrentIndexSpec}
|
||||||
setCurrentIndexSpec(v);
|
setError={setJsonError}
|
||||||
setJsonError(undefined);
|
|
||||||
}}
|
|
||||||
onError={setJsonError}
|
|
||||||
issueWithValue={value => AutoForm.issueWithModel(value, INDEX_SPEC_FIELDS)}
|
issueWithValue={value => AutoForm.issueWithModel(value, INDEX_SPEC_FIELDS)}
|
||||||
height="100%"
|
height="100%"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -121,7 +121,13 @@ export const LookupEditDialog = React.memo(function LookupEditDialog(props: Look
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormJsonSelector tab={currentTab} onChange={setCurrentTab} />
|
<FormJsonSelector
|
||||||
|
tab={currentTab}
|
||||||
|
onChange={t => {
|
||||||
|
setJsonError(undefined);
|
||||||
|
setCurrentTab(t);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{currentTab === 'form' ? (
|
{currentTab === 'form' ? (
|
||||||
<AutoForm
|
<AutoForm
|
||||||
fields={LOOKUP_FIELDS}
|
fields={LOOKUP_FIELDS}
|
||||||
|
@ -134,11 +140,8 @@ export const LookupEditDialog = React.memo(function LookupEditDialog(props: Look
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={lookupSpec}
|
value={lookupSpec}
|
||||||
height="80vh"
|
height="80vh"
|
||||||
onChange={m => {
|
onChange={m => onChange('spec', m)}
|
||||||
onChange('spec', m);
|
setError={setJsonError}
|
||||||
setJsonError(undefined);
|
|
||||||
}}
|
|
||||||
onError={setJsonError}
|
|
||||||
issueWithValue={spec => AutoForm.issueWithModel(spec, LOOKUP_FIELDS)}
|
issueWithValue={spec => AutoForm.issueWithModel(spec, LOOKUP_FIELDS)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -114,7 +114,13 @@ export const OverlordDynamicConfigDialog = React.memo(function OverlordDynamicCo
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
<FormJsonSelector tab={currentTab} onChange={setCurrentTab} />
|
<FormJsonSelector
|
||||||
|
tab={currentTab}
|
||||||
|
onChange={t => {
|
||||||
|
setJsonError(undefined);
|
||||||
|
setCurrentTab(t);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{currentTab === 'form' ? (
|
{currentTab === 'form' ? (
|
||||||
<AutoForm
|
<AutoForm
|
||||||
fields={OVERLORD_DYNAMIC_CONFIG_FIELDS}
|
fields={OVERLORD_DYNAMIC_CONFIG_FIELDS}
|
||||||
|
@ -125,11 +131,8 @@ export const OverlordDynamicConfigDialog = React.memo(function OverlordDynamicCo
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={dynamicConfig}
|
value={dynamicConfig}
|
||||||
height="50vh"
|
height="50vh"
|
||||||
onChange={v => {
|
onChange={setDynamicConfig}
|
||||||
setDynamicConfig(v);
|
setError={setJsonError}
|
||||||
setJsonError(undefined);
|
|
||||||
}}
|
|
||||||
onError={setJsonError}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -187,7 +187,7 @@ ORDER BY 1`,
|
||||||
<JsonInput
|
<JsonInput
|
||||||
value={currentRules}
|
value={currentRules}
|
||||||
onChange={setCurrentRules}
|
onChange={setCurrentRules}
|
||||||
onError={setJsonError}
|
setError={setJsonError}
|
||||||
height="100%"
|
height="100%"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -28,10 +28,14 @@ export interface AsyncStatusResponse {
|
||||||
schema?: { name: string; type: string; nativeType: string }[];
|
schema?: { name: string; type: string; nativeType: string }[];
|
||||||
result?: {
|
result?: {
|
||||||
dataSource: string;
|
dataSource: string;
|
||||||
sampleRecords: any[][];
|
sampleRecords?: any[][];
|
||||||
numTotalRows: number;
|
numTotalRows: number;
|
||||||
totalSizeInBytes: number;
|
totalSizeInBytes: number;
|
||||||
pages: any[];
|
pages?: {
|
||||||
|
id: number;
|
||||||
|
numRows: number;
|
||||||
|
sizeInBytes: number;
|
||||||
|
}[];
|
||||||
};
|
};
|
||||||
errorDetails?: ErrorResponse;
|
errorDetails?: ErrorResponse;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,12 @@ PARTITIONED BY ALL TIME
|
||||||
export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
multiStageQuery: {
|
multiStageQuery: {
|
||||||
type: 'multiStageQuery',
|
type: 'multiStageQuery',
|
||||||
taskId: 'query-5aa683e2-a6ee-4655-a834-a643e91055b1',
|
taskId: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
payload: {
|
payload: {
|
||||||
status: {
|
status: {
|
||||||
status: 'SUCCESS',
|
status: 'SUCCESS',
|
||||||
startTime: '2023-06-19T05:39:26.377Z',
|
startTime: '2023-08-01T03:12:59.527Z',
|
||||||
durationMs: 23170,
|
durationMs: 23699,
|
||||||
pendingTasks: 0,
|
pendingTasks: 0,
|
||||||
runningTasks: 2,
|
runningTasks: 2,
|
||||||
},
|
},
|
||||||
|
@ -56,7 +56,7 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
{
|
{
|
||||||
stageNumber: 0,
|
stageNumber: 0,
|
||||||
definition: {
|
definition: {
|
||||||
id: '8af42220-2724-4a76-b39f-c2f98df2de69_0',
|
id: 'ad318360-2ccf-4afc-b221-27c8704bf4fe_0',
|
||||||
input: [
|
input: [
|
||||||
{
|
{
|
||||||
type: 'external',
|
type: 'external',
|
||||||
|
@ -129,16 +129,17 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
context: {
|
context: {
|
||||||
__timeColumn: 'v0',
|
__timeColumn: 'v0',
|
||||||
__user: 'allowAll',
|
__user: 'allowAll',
|
||||||
|
executionMode: 'async',
|
||||||
finalize: false,
|
finalize: false,
|
||||||
finalizeAggregations: false,
|
finalizeAggregations: false,
|
||||||
groupByEnableMultiValueUnnesting: false,
|
groupByEnableMultiValueUnnesting: false,
|
||||||
maxNumTasks: 2,
|
maxNumTasks: 2,
|
||||||
maxParseExceptions: 0,
|
maxParseExceptions: 0,
|
||||||
queryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
queryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
scanSignature:
|
scanSignature:
|
||||||
'[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
'[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
||||||
sqlInsertSegmentGranularity: '{"type":"all"}',
|
sqlInsertSegmentGranularity: '{"type":"all"}',
|
||||||
sqlQueryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
sqlQueryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
sqlReplaceTimeChunks: 'all',
|
sqlReplaceTimeChunks: 'all',
|
||||||
},
|
},
|
||||||
granularity: {
|
granularity: {
|
||||||
|
@ -178,14 +179,14 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
phase: 'FINISHED',
|
phase: 'FINISHED',
|
||||||
workerCount: 1,
|
workerCount: 1,
|
||||||
partitionCount: 1,
|
partitionCount: 1,
|
||||||
startTime: '2023-06-19T05:39:26.711Z',
|
startTime: '2023-08-01T03:12:59.865Z',
|
||||||
duration: 20483,
|
duration: 21324,
|
||||||
sort: true,
|
sort: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageNumber: 1,
|
stageNumber: 1,
|
||||||
definition: {
|
definition: {
|
||||||
id: '8af42220-2724-4a76-b39f-c2f98df2de69_1',
|
id: 'ad318360-2ccf-4afc-b221-27c8704bf4fe_1',
|
||||||
input: [
|
input: [
|
||||||
{
|
{
|
||||||
type: 'stage',
|
type: 'stage',
|
||||||
|
@ -250,8 +251,8 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
phase: 'FINISHED',
|
phase: 'FINISHED',
|
||||||
workerCount: 1,
|
workerCount: 1,
|
||||||
partitionCount: 1,
|
partitionCount: 1,
|
||||||
startTime: '2023-06-19T05:39:47.166Z',
|
startTime: '2023-08-01T03:13:21.156Z',
|
||||||
duration: 2381,
|
duration: 2070,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
counters: {
|
counters: {
|
||||||
|
@ -314,120 +315,135 @@ export const EXECUTION_INGEST_COMPLETE = Execution.fromTaskReport({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}).updateWithTaskPayload({
|
})
|
||||||
task: 'query-5aa683e2-a6ee-4655-a834-a643e91055b1',
|
.updateWithTaskPayload({
|
||||||
payload: {
|
task: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
type: 'query_controller',
|
payload: {
|
||||||
id: 'query-5aa683e2-a6ee-4655-a834-a643e91055b1',
|
type: 'query_controller',
|
||||||
spec: {
|
id: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
query: {
|
spec: {
|
||||||
queryType: 'scan',
|
query: {
|
||||||
dataSource: {
|
queryType: 'scan',
|
||||||
type: 'external',
|
dataSource: {
|
||||||
inputSource: {
|
type: 'external',
|
||||||
type: 'http',
|
inputSource: {
|
||||||
uris: ['https://static.imply.io/example-data/kttm-v2/kttm-v2-2019-08-25.json.gz'],
|
type: 'http',
|
||||||
},
|
uris: ['https://static.imply.io/example-data/kttm-v2/kttm-v2-2019-08-25.json.gz'],
|
||||||
inputFormat: {
|
|
||||||
type: 'json',
|
|
||||||
keepNullColumns: false,
|
|
||||||
assumeNewlineDelimited: false,
|
|
||||||
useJsonNodeReader: false,
|
|
||||||
},
|
|
||||||
signature: [
|
|
||||||
{
|
|
||||||
name: 'timestamp',
|
|
||||||
type: 'STRING',
|
|
||||||
},
|
},
|
||||||
|
inputFormat: {
|
||||||
|
type: 'json',
|
||||||
|
keepNullColumns: false,
|
||||||
|
assumeNewlineDelimited: false,
|
||||||
|
useJsonNodeReader: false,
|
||||||
|
},
|
||||||
|
signature: [
|
||||||
|
{
|
||||||
|
name: 'timestamp',
|
||||||
|
type: 'STRING',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'agent_type',
|
||||||
|
type: 'STRING',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
intervals: {
|
||||||
|
type: 'intervals',
|
||||||
|
intervals: ['-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z'],
|
||||||
|
},
|
||||||
|
virtualColumns: [
|
||||||
{
|
{
|
||||||
name: 'agent_type',
|
type: 'expression',
|
||||||
type: 'STRING',
|
name: 'v0',
|
||||||
|
expression: 'timestamp_parse("timestamp",null,\'UTC\')',
|
||||||
|
outputType: 'LONG',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
resultFormat: 'compactedList',
|
||||||
|
columns: ['agent_type', 'v0'],
|
||||||
|
legacy: false,
|
||||||
|
context: {
|
||||||
|
__user: 'allowAll',
|
||||||
|
executionMode: 'async',
|
||||||
|
finalize: false,
|
||||||
|
finalizeAggregations: false,
|
||||||
|
groupByEnableMultiValueUnnesting: false,
|
||||||
|
maxNumTasks: 2,
|
||||||
|
maxParseExceptions: 0,
|
||||||
|
queryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
|
scanSignature: '[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
||||||
|
sqlInsertSegmentGranularity: '{"type":"all"}',
|
||||||
|
sqlQueryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
|
sqlReplaceTimeChunks: 'all',
|
||||||
|
},
|
||||||
|
granularity: {
|
||||||
|
type: 'all',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
intervals: {
|
columnMappings: [
|
||||||
type: 'intervals',
|
|
||||||
intervals: ['-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z'],
|
|
||||||
},
|
|
||||||
virtualColumns: [
|
|
||||||
{
|
{
|
||||||
type: 'expression',
|
queryColumn: 'v0',
|
||||||
name: 'v0',
|
outputColumn: '__time',
|
||||||
expression: 'timestamp_parse("timestamp",null,\'UTC\')',
|
},
|
||||||
outputType: 'LONG',
|
{
|
||||||
|
queryColumn: 'agent_type',
|
||||||
|
outputColumn: 'agent_type',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
resultFormat: 'compactedList',
|
destination: {
|
||||||
columns: ['agent_type', 'v0'],
|
type: 'dataSource',
|
||||||
legacy: false,
|
dataSource: 'kttm_simple',
|
||||||
context: {
|
segmentGranularity: {
|
||||||
__user: 'allowAll',
|
type: 'all',
|
||||||
finalize: false,
|
},
|
||||||
finalizeAggregations: false,
|
replaceTimeChunks: ['-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z'],
|
||||||
groupByEnableMultiValueUnnesting: false,
|
|
||||||
maxNumTasks: 2,
|
|
||||||
maxParseExceptions: 0,
|
|
||||||
queryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
|
||||||
scanSignature: '[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
|
||||||
sqlInsertSegmentGranularity: '{"type":"all"}',
|
|
||||||
sqlQueryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
|
||||||
sqlReplaceTimeChunks: 'all',
|
|
||||||
},
|
},
|
||||||
granularity: {
|
assignmentStrategy: 'max',
|
||||||
type: 'all',
|
tuningConfig: {
|
||||||
|
maxNumWorkers: 1,
|
||||||
|
maxRowsInMemory: 100000,
|
||||||
|
rowsPerSegment: 3000000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
columnMappings: [
|
sqlQuery:
|
||||||
{
|
'REPLACE INTO "kttm_simple" OVERWRITE ALL\nSELECT\n TIME_PARSE("timestamp") AS "__time",\n "agent_type"\nFROM TABLE(\n EXTERN(\n \'{"type":"http","uris":["https://static.imply.io/example-data/kttm-v2/kttm-v2-2019-08-25.json.gz"]}\',\n \'{"type":"json"}\'\n )\n) EXTEND ("timestamp" VARCHAR, "agent_type" VARCHAR)\nPARTITIONED BY ALL TIME',
|
||||||
queryColumn: 'v0',
|
sqlQueryContext: {
|
||||||
outputColumn: '__time',
|
finalizeAggregations: false,
|
||||||
},
|
sqlQueryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
{
|
groupByEnableMultiValueUnnesting: false,
|
||||||
queryColumn: 'agent_type',
|
sqlInsertSegmentGranularity: '{"type":"all"}',
|
||||||
outputColumn: 'agent_type',
|
maxNumTasks: 2,
|
||||||
},
|
sqlReplaceTimeChunks: 'all',
|
||||||
],
|
executionMode: 'async',
|
||||||
destination: {
|
queryId: '93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
type: 'dataSource',
|
|
||||||
dataSource: 'kttm_simple',
|
|
||||||
segmentGranularity: {
|
|
||||||
type: 'all',
|
|
||||||
},
|
|
||||||
replaceTimeChunks: ['-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z'],
|
|
||||||
},
|
},
|
||||||
assignmentStrategy: 'max',
|
sqlResultsContext: {
|
||||||
tuningConfig: {
|
timeZone: 'UTC',
|
||||||
maxNumWorkers: 1,
|
serializeComplexValues: true,
|
||||||
maxRowsInMemory: 100000,
|
stringifyArrays: true,
|
||||||
rowsPerSegment: 3000000,
|
},
|
||||||
|
sqlTypeNames: ['TIMESTAMP', 'VARCHAR'],
|
||||||
|
nativeTypeNames: ['LONG', 'STRING'],
|
||||||
|
context: {
|
||||||
|
forceTimeChunkLock: true,
|
||||||
|
useLineageBasedSegmentAllocation: true,
|
||||||
|
},
|
||||||
|
groupId: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
|
dataSource: 'kttm_simple',
|
||||||
|
resource: {
|
||||||
|
availabilityGroup: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
|
requiredCapacity: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sqlQuery:
|
})
|
||||||
'REPLACE INTO "kttm_simple" OVERWRITE ALL\nSELECT\n TIME_PARSE("timestamp") AS "__time",\n "agent_type"\nFROM TABLE(\n EXTERN(\n \'{"type":"http","uris":["https://static.imply.io/example-data/kttm-v2/kttm-v2-2019-08-25.json.gz"]}\',\n \'{"type":"json"}\'\n )\n) EXTEND ("timestamp" VARCHAR, "agent_type" VARCHAR)\nPARTITIONED BY ALL TIME',
|
.updateWithAsyncStatus({
|
||||||
sqlQueryContext: {
|
queryId: 'query-93a855fa-c35a-48df-b596-6bc98eed1101',
|
||||||
finalizeAggregations: false,
|
state: 'SUCCESS',
|
||||||
sqlQueryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
createdAt: '2023-08-01T03:12:50.121Z',
|
||||||
groupByEnableMultiValueUnnesting: false,
|
durationMs: 37657,
|
||||||
sqlInsertSegmentGranularity: '{"type":"all"}',
|
result: {
|
||||||
maxNumTasks: 2,
|
numTotalRows: 465346,
|
||||||
sqlReplaceTimeChunks: 'all',
|
totalSizeInBytes: 0,
|
||||||
queryId: '5aa683e2-a6ee-4655-a834-a643e91055b1',
|
dataSource: 'kttm_simple',
|
||||||
},
|
},
|
||||||
sqlResultsContext: {
|
});
|
||||||
timeZone: 'UTC',
|
|
||||||
serializeComplexValues: true,
|
|
||||||
stringifyArrays: true,
|
|
||||||
},
|
|
||||||
sqlTypeNames: ['TIMESTAMP', 'VARCHAR'],
|
|
||||||
context: {
|
|
||||||
forceTimeChunkLock: true,
|
|
||||||
useLineageBasedSegmentAllocation: true,
|
|
||||||
},
|
|
||||||
groupId: 'query-5aa683e2-a6ee-4655-a834-a643e91055b1',
|
|
||||||
dataSource: 'kttm_simple',
|
|
||||||
resource: {
|
|
||||||
availabilityGroup: 'query-5aa683e2-a6ee-4655-a834-a643e91055b1',
|
|
||||||
requiredCapacity: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
|
@ -44,12 +44,12 @@ PARTITIONED BY DAY
|
||||||
export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
multiStageQuery: {
|
multiStageQuery: {
|
||||||
type: 'multiStageQuery',
|
type: 'multiStageQuery',
|
||||||
taskId: 'query-8f889312-e989-4b4c-9895-485a1fe796d3',
|
taskId: 'query-af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
payload: {
|
payload: {
|
||||||
status: {
|
status: {
|
||||||
status: 'FAILED',
|
status: 'FAILED',
|
||||||
errorReport: {
|
errorReport: {
|
||||||
taskId: 'query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0',
|
taskId: 'query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0',
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
error: {
|
error: {
|
||||||
errorCode: 'TooManyWarnings',
|
errorCode: 'TooManyWarnings',
|
||||||
|
@ -60,7 +60,7 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
},
|
},
|
||||||
warnings: [
|
warnings: [
|
||||||
{
|
{
|
||||||
taskId: 'query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0',
|
taskId: 'query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0',
|
||||||
host: 'localhost:8101',
|
host: 'localhost:8101',
|
||||||
stageNumber: 0,
|
stageNumber: 0,
|
||||||
error: {
|
error: {
|
||||||
|
@ -69,10 +69,10 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
'Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 3, Line: 3)',
|
'Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 3, Line: 3)',
|
||||||
},
|
},
|
||||||
exceptionStackTrace:
|
exceptionStackTrace:
|
||||||
'org.apache.druid.java.util.common.parsers.ParseException: Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 3, Line: 3)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:79)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)\n\tat org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)\n\tat org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)\n\tat org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)\n\tat org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)\n\tat org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)\n\tat org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)\n\tat org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)\n\tat org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: (String)""; line: 1, column: 0]\n\tat com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4360)\n\tat com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4205)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3214)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3182)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)\n\t... 22 more\n',
|
'org.apache.druid.java.util.common.parsers.ParseException: Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 3, Line: 3)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:79)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)\n\tat org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)\n\tat org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)\n\tat org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)\n\tat org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)\n\tat org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)\n\tat org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)\n\tat org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)\n\tat org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: (String)""; line: 1, column: 0]\n\tat com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4360)\n\tat com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4205)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3214)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3182)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)\n\t... 23 more\n',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
taskId: 'query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0',
|
taskId: 'query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0',
|
||||||
host: 'localhost:8101',
|
host: 'localhost:8101',
|
||||||
stageNumber: 0,
|
stageNumber: 0,
|
||||||
error: {
|
error: {
|
||||||
|
@ -81,11 +81,11 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
'Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 6, Line: 7)',
|
'Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 6, Line: 7)',
|
||||||
},
|
},
|
||||||
exceptionStackTrace:
|
exceptionStackTrace:
|
||||||
'org.apache.druid.java.util.common.parsers.ParseException: Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 6, Line: 7)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:79)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)\n\tat org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)\n\tat org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)\n\tat org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)\n\tat org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)\n\tat org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)\n\tat org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)\n\tat org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)\n\tat org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: (String)""; line: 1, column: 0]\n\tat com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4360)\n\tat com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4205)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3214)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3182)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)\n\t... 22 more\n',
|
'org.apache.druid.java.util.common.parsers.ParseException: Unable to parse row [] (Path: https://static.imply.io/example-data/kttm-with-issues/kttm-blank-lines.json, Record: 6, Line: 7)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:79)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)\n\tat org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)\n\tat org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)\n\tat org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)\n\tat org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)\n\tat org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)\n\tat org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)\n\tat org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)\n\tat org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)\n\tat org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)\n\tat org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)\n\tat org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input\n at [Source: (String)""; line: 1, column: 0]\n\tat com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4360)\n\tat com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4205)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3214)\n\tat com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3182)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)\n\tat org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)\n\tat org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)\n\t... 23 more\n',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
startTime: '2023-06-19T05:37:48.605Z',
|
startTime: '2023-08-01T04:20:24.945Z',
|
||||||
durationMs: 14760,
|
durationMs: 14545,
|
||||||
pendingTasks: 0,
|
pendingTasks: 0,
|
||||||
runningTasks: 2,
|
runningTasks: 2,
|
||||||
},
|
},
|
||||||
|
@ -93,7 +93,7 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
{
|
{
|
||||||
stageNumber: 0,
|
stageNumber: 0,
|
||||||
definition: {
|
definition: {
|
||||||
id: 'd337a3d8-e361-4795-8eaa-97ced72d9a7b_0',
|
id: 'f635e36d-6b90-4b74-ad5e-a179c99f0ddc_0',
|
||||||
input: [
|
input: [
|
||||||
{
|
{
|
||||||
type: 'external',
|
type: 'external',
|
||||||
|
@ -168,16 +168,17 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
context: {
|
context: {
|
||||||
__timeColumn: 'v0',
|
__timeColumn: 'v0',
|
||||||
__user: 'allowAll',
|
__user: 'allowAll',
|
||||||
|
executionMode: 'async',
|
||||||
finalize: false,
|
finalize: false,
|
||||||
finalizeAggregations: false,
|
finalizeAggregations: false,
|
||||||
groupByEnableMultiValueUnnesting: false,
|
groupByEnableMultiValueUnnesting: false,
|
||||||
maxNumTasks: 2,
|
maxNumTasks: 2,
|
||||||
maxParseExceptions: 2,
|
maxParseExceptions: 2,
|
||||||
queryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
queryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
scanSignature:
|
scanSignature:
|
||||||
'[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
'[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
||||||
sqlInsertSegmentGranularity: '"DAY"',
|
sqlInsertSegmentGranularity: '"DAY"',
|
||||||
sqlQueryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
sqlQueryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
sqlReplaceTimeChunks: 'all',
|
sqlReplaceTimeChunks: 'all',
|
||||||
},
|
},
|
||||||
granularity: {
|
granularity: {
|
||||||
|
@ -225,14 +226,14 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
},
|
},
|
||||||
phase: 'FAILED',
|
phase: 'FAILED',
|
||||||
workerCount: 1,
|
workerCount: 1,
|
||||||
startTime: '2023-06-19T05:37:48.952Z',
|
startTime: '2023-08-01T04:20:25.296Z',
|
||||||
duration: 14412,
|
duration: 14193,
|
||||||
sort: true,
|
sort: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
stageNumber: 1,
|
stageNumber: 1,
|
||||||
definition: {
|
definition: {
|
||||||
id: 'd337a3d8-e361-4795-8eaa-97ced72d9a7b_1',
|
id: 'f635e36d-6b90-4b74-ad5e-a179c99f0ddc_1',
|
||||||
input: [
|
input: [
|
||||||
{
|
{
|
||||||
type: 'stage',
|
type: 'stage',
|
||||||
|
@ -334,10 +335,10 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}).updateWithTaskPayload({
|
}).updateWithTaskPayload({
|
||||||
task: 'query-8f889312-e989-4b4c-9895-485a1fe796d3',
|
task: 'query-af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
payload: {
|
payload: {
|
||||||
type: 'query_controller',
|
type: 'query_controller',
|
||||||
id: 'query-8f889312-e989-4b4c-9895-485a1fe796d3',
|
id: 'query-af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
spec: {
|
spec: {
|
||||||
query: {
|
query: {
|
||||||
queryType: 'scan',
|
queryType: 'scan',
|
||||||
|
@ -381,15 +382,16 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
context: {
|
context: {
|
||||||
__user: 'allowAll',
|
__user: 'allowAll',
|
||||||
|
executionMode: 'async',
|
||||||
finalize: false,
|
finalize: false,
|
||||||
finalizeAggregations: false,
|
finalizeAggregations: false,
|
||||||
groupByEnableMultiValueUnnesting: false,
|
groupByEnableMultiValueUnnesting: false,
|
||||||
maxNumTasks: 2,
|
maxNumTasks: 2,
|
||||||
maxParseExceptions: 2,
|
maxParseExceptions: 2,
|
||||||
queryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
queryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
scanSignature: '[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
scanSignature: '[{"name":"agent_type","type":"STRING"},{"name":"v0","type":"LONG"}]',
|
||||||
sqlInsertSegmentGranularity: '"DAY"',
|
sqlInsertSegmentGranularity: '"DAY"',
|
||||||
sqlQueryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
sqlQueryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
sqlReplaceTimeChunks: 'all',
|
sqlReplaceTimeChunks: 'all',
|
||||||
},
|
},
|
||||||
granularity: {
|
granularity: {
|
||||||
|
@ -424,12 +426,13 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
sqlQueryContext: {
|
sqlQueryContext: {
|
||||||
maxParseExceptions: 2,
|
maxParseExceptions: 2,
|
||||||
finalizeAggregations: false,
|
finalizeAggregations: false,
|
||||||
sqlQueryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
sqlQueryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
groupByEnableMultiValueUnnesting: false,
|
groupByEnableMultiValueUnnesting: false,
|
||||||
sqlInsertSegmentGranularity: '"DAY"',
|
sqlInsertSegmentGranularity: '"DAY"',
|
||||||
maxNumTasks: 2,
|
maxNumTasks: 2,
|
||||||
sqlReplaceTimeChunks: 'all',
|
sqlReplaceTimeChunks: 'all',
|
||||||
queryId: '8f889312-e989-4b4c-9895-485a1fe796d3',
|
executionMode: 'async',
|
||||||
|
queryId: 'af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
},
|
},
|
||||||
sqlResultsContext: {
|
sqlResultsContext: {
|
||||||
timeZone: 'UTC',
|
timeZone: 'UTC',
|
||||||
|
@ -437,14 +440,15 @@ export const EXECUTION_INGEST_ERROR = Execution.fromTaskReport({
|
||||||
stringifyArrays: true,
|
stringifyArrays: true,
|
||||||
},
|
},
|
||||||
sqlTypeNames: ['TIMESTAMP', 'VARCHAR'],
|
sqlTypeNames: ['TIMESTAMP', 'VARCHAR'],
|
||||||
|
nativeTypeNames: ['LONG', 'STRING'],
|
||||||
context: {
|
context: {
|
||||||
forceTimeChunkLock: true,
|
forceTimeChunkLock: true,
|
||||||
useLineageBasedSegmentAllocation: true,
|
useLineageBasedSegmentAllocation: true,
|
||||||
},
|
},
|
||||||
groupId: 'query-8f889312-e989-4b4c-9895-485a1fe796d3',
|
groupId: 'query-af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
dataSource: 'kttm-blank-lines',
|
dataSource: 'kttm-blank-lines',
|
||||||
resource: {
|
resource: {
|
||||||
availabilityGroup: 'query-8f889312-e989-4b4c-9895-485a1fe796d3',
|
availabilityGroup: 'query-af8a263d-213f-418e-ad8d-37d55beff59b',
|
||||||
requiredCapacity: 1,
|
requiredCapacity: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -42,10 +42,14 @@ describe('Execution', () => {
|
||||||
"useLineageBasedSegmentAllocation": true,
|
"useLineageBasedSegmentAllocation": true,
|
||||||
},
|
},
|
||||||
"dataSource": "kttm_simple",
|
"dataSource": "kttm_simple",
|
||||||
"groupId": "query-5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"groupId": "query-93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"id": "query-5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"id": "query-93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
|
"nativeTypeNames": Array [
|
||||||
|
"LONG",
|
||||||
|
"STRING",
|
||||||
|
],
|
||||||
"resource": Object {
|
"resource": Object {
|
||||||
"availabilityGroup": "query-5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"availabilityGroup": "query-93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"requiredCapacity": 1,
|
"requiredCapacity": 1,
|
||||||
},
|
},
|
||||||
"spec": Object {
|
"spec": Object {
|
||||||
|
@ -77,15 +81,16 @@ describe('Execution', () => {
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 0,
|
"maxParseExceptions": 0,
|
||||||
"queryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"queryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
||||||
"sqlQueryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"sqlQueryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -152,12 +157,13 @@ describe('Execution', () => {
|
||||||
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
||||||
PARTITIONED BY ALL TIME",
|
PARTITIONED BY ALL TIME",
|
||||||
"sqlQueryContext": Object {
|
"sqlQueryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"queryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"queryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
||||||
"sqlQueryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"sqlQueryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"sqlResultsContext": Object {
|
"sqlResultsContext": Object {
|
||||||
|
@ -171,11 +177,12 @@ describe('Execution', () => {
|
||||||
],
|
],
|
||||||
"type": "query_controller",
|
"type": "query_controller",
|
||||||
},
|
},
|
||||||
"task": "query-5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"task": "query-93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
},
|
},
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": Object {
|
"destination": Object {
|
||||||
"dataSource": "kttm_simple",
|
"dataSource": "kttm_simple",
|
||||||
|
"numTotalRows": 465346,
|
||||||
"replaceTimeChunks": Array [
|
"replaceTimeChunks": Array [
|
||||||
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z",
|
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z",
|
||||||
],
|
],
|
||||||
|
@ -184,10 +191,11 @@ describe('Execution', () => {
|
||||||
},
|
},
|
||||||
"type": "dataSource",
|
"type": "dataSource",
|
||||||
},
|
},
|
||||||
"duration": 23170,
|
"destinationPages": undefined,
|
||||||
|
"duration": 23699,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": undefined,
|
"error": undefined,
|
||||||
"id": "query-5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"id": "query-93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"nativeQuery": Object {
|
"nativeQuery": Object {
|
||||||
"columns": Array [
|
"columns": Array [
|
||||||
"agent_type",
|
"agent_type",
|
||||||
|
@ -195,15 +203,16 @@ describe('Execution', () => {
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 0,
|
"maxParseExceptions": 0,
|
||||||
"queryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"queryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
||||||
"sqlQueryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"sqlQueryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -253,6 +262,7 @@ describe('Execution', () => {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"queryContext": Object {
|
"queryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
|
@ -357,7 +367,7 @@ describe('Execution', () => {
|
||||||
"stages": Array [
|
"stages": Array [
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "8af42220-2724-4a76-b39f-c2f98df2de69_0",
|
"id": "ad318360-2ccf-4afc-b221-27c8704bf4fe_0",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"inputFormat": Object {
|
"inputFormat": Object {
|
||||||
|
@ -395,15 +405,16 @@ describe('Execution', () => {
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__timeColumn": "v0",
|
"__timeColumn": "v0",
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 0,
|
"maxParseExceptions": 0,
|
||||||
"queryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"queryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
||||||
"sqlQueryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"sqlQueryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -482,17 +493,17 @@ describe('Execution', () => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"duration": 20483,
|
"duration": 21324,
|
||||||
"partitionCount": 1,
|
"partitionCount": 1,
|
||||||
"phase": "FINISHED",
|
"phase": "FINISHED",
|
||||||
"sort": true,
|
"sort": true,
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"startTime": "2023-06-19T05:39:26.711Z",
|
"startTime": "2023-08-01T03:12:59.865Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "8af42220-2724-4a76-b39f-c2f98df2de69_1",
|
"id": "ad318360-2ccf-4afc-b221-27c8704bf4fe_1",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"stage": 0,
|
"stage": 0,
|
||||||
|
@ -558,16 +569,16 @@ describe('Execution', () => {
|
||||||
},
|
},
|
||||||
"signature": Array [],
|
"signature": Array [],
|
||||||
},
|
},
|
||||||
"duration": 2381,
|
"duration": 2070,
|
||||||
"partitionCount": 1,
|
"partitionCount": 1,
|
||||||
"phase": "FINISHED",
|
"phase": "FINISHED",
|
||||||
"stageNumber": 1,
|
"stageNumber": 1,
|
||||||
"startTime": "2023-06-19T05:39:47.166Z",
|
"startTime": "2023-08-01T03:13:21.156Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"startTime": 2023-06-19T05:39:26.377Z,
|
"startTime": 2023-08-01T03:12:59.527Z,
|
||||||
"status": "SUCCESS",
|
"status": "SUCCESS",
|
||||||
"usageInfo": Object {
|
"usageInfo": Object {
|
||||||
"pendingTasks": 0,
|
"pendingTasks": 0,
|
||||||
|
@ -586,8 +597,16 @@ describe('Execution', () => {
|
||||||
"_payload": undefined,
|
"_payload": undefined,
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": Object {
|
"destination": Object {
|
||||||
|
"numTotalRows": 2,
|
||||||
"type": "taskReport",
|
"type": "taskReport",
|
||||||
},
|
},
|
||||||
|
"destinationPages": Array [
|
||||||
|
Object {
|
||||||
|
"id": 0,
|
||||||
|
"numRows": 2,
|
||||||
|
"sizeInBytes": 116,
|
||||||
|
},
|
||||||
|
],
|
||||||
"duration": 29168,
|
"duration": 29168,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": undefined,
|
"error": undefined,
|
||||||
|
@ -640,6 +659,7 @@ describe('Execution', () => {
|
||||||
"_payload": undefined,
|
"_payload": undefined,
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": undefined,
|
"destination": undefined,
|
||||||
|
"destinationPages": undefined,
|
||||||
"duration": 11217,
|
"duration": 11217,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
|
|
@ -31,12 +31,7 @@ import type { DruidEngine } from '../druid-engine/druid-engine';
|
||||||
import { validDruidEngine } from '../druid-engine/druid-engine';
|
import { validDruidEngine } from '../druid-engine/druid-engine';
|
||||||
import type { QueryContext } from '../query-context/query-context';
|
import type { QueryContext } from '../query-context/query-context';
|
||||||
import { Stages } from '../stages/stages';
|
import { Stages } from '../stages/stages';
|
||||||
import type {
|
import type { MsqTaskPayloadResponse, MsqTaskReportResponse, TaskStatus } from '../task/task';
|
||||||
MsqTaskPayloadResponse,
|
|
||||||
MsqTaskReportResponse,
|
|
||||||
TaskStatus,
|
|
||||||
TaskStatusResponse,
|
|
||||||
} from '../task/task';
|
|
||||||
|
|
||||||
const IGNORE_CONTEXT_KEYS = [
|
const IGNORE_CONTEXT_KEYS = [
|
||||||
'__asyncIdentity__',
|
'__asyncIdentity__',
|
||||||
|
@ -70,12 +65,19 @@ export interface ExecutionError {
|
||||||
exceptionStackTrace?: string;
|
exceptionStackTrace?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExecutionDestination =
|
export type ExecutionDestination =
|
||||||
| {
|
| {
|
||||||
type: 'taskReport';
|
type: 'taskReport';
|
||||||
|
numTotalRows?: number;
|
||||||
}
|
}
|
||||||
| { type: 'dataSource'; dataSource: string; numRows?: number; loaded?: boolean }
|
| { type: 'durableStorage'; numTotalRows?: number }
|
||||||
| { type: 'download' };
|
| { type: 'dataSource'; dataSource: string; numTotalRows?: number; loaded?: boolean };
|
||||||
|
|
||||||
|
export interface ExecutionDestinationPage {
|
||||||
|
id: number;
|
||||||
|
numRows: number;
|
||||||
|
sizeInBytes: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type ExecutionStatus = 'RUNNING' | 'FAILED' | 'SUCCESS';
|
export type ExecutionStatus = 'RUNNING' | 'FAILED' | 'SUCCESS';
|
||||||
|
|
||||||
|
@ -174,6 +176,7 @@ export interface ExecutionValue {
|
||||||
usageInfo?: UsageInfo;
|
usageInfo?: UsageInfo;
|
||||||
stages?: Stages;
|
stages?: Stages;
|
||||||
destination?: ExecutionDestination;
|
destination?: ExecutionDestination;
|
||||||
|
destinationPages?: ExecutionDestinationPage[];
|
||||||
result?: QueryResult;
|
result?: QueryResult;
|
||||||
error?: ExecutionError;
|
error?: ExecutionError;
|
||||||
warnings?: ExecutionError[];
|
warnings?: ExecutionError[];
|
||||||
|
@ -214,38 +217,6 @@ export class Execution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromTaskSubmit(
|
|
||||||
taskSubmitResult: { state: any; taskId: string; error: any },
|
|
||||||
sqlQuery?: string,
|
|
||||||
queryContext?: QueryContext,
|
|
||||||
): Execution {
|
|
||||||
const status = Execution.normalizeTaskStatus(taskSubmitResult.state);
|
|
||||||
return new Execution({
|
|
||||||
engine: 'sql-msq-task',
|
|
||||||
id: taskSubmitResult.taskId,
|
|
||||||
status: taskSubmitResult.error ? 'FAILED' : status,
|
|
||||||
sqlQuery,
|
|
||||||
queryContext,
|
|
||||||
error: taskSubmitResult.error
|
|
||||||
? {
|
|
||||||
error: {
|
|
||||||
errorCode: 'AsyncError',
|
|
||||||
errorMessage: JSON.stringify(taskSubmitResult.error),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: status === 'FAILED'
|
|
||||||
? {
|
|
||||||
error: {
|
|
||||||
errorCode: 'UnknownError',
|
|
||||||
errorMessage:
|
|
||||||
'Execution failed, there is no detail information, and there is no error in the status response',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
destination: undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static fromAsyncStatus(
|
static fromAsyncStatus(
|
||||||
asyncSubmitResult: AsyncStatusResponse,
|
asyncSubmitResult: AsyncStatusResponse,
|
||||||
sqlQuery?: string,
|
sqlQuery?: string,
|
||||||
|
@ -286,49 +257,18 @@ export class Execution {
|
||||||
? {
|
? {
|
||||||
type: 'dataSource',
|
type: 'dataSource',
|
||||||
dataSource: result.dataSource,
|
dataSource: result.dataSource,
|
||||||
numRows: result.numTotalRows,
|
numTotalRows: result.numTotalRows,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
type: 'taskReport',
|
type: 'taskReport',
|
||||||
|
numTotalRows: result.numTotalRows,
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
destinationPages: result?.pages,
|
||||||
result: queryResult,
|
result: queryResult,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromTaskStatus(
|
|
||||||
taskStatus: TaskStatusResponse,
|
|
||||||
sqlQuery?: string,
|
|
||||||
queryContext?: QueryContext,
|
|
||||||
): Execution {
|
|
||||||
const status = Execution.normalizeTaskStatus(taskStatus.status.status);
|
|
||||||
return new Execution({
|
|
||||||
engine: 'sql-msq-task',
|
|
||||||
id: taskStatus.task,
|
|
||||||
status: taskStatus.status.error ? 'FAILED' : status,
|
|
||||||
usageInfo: getUsageInfoFromStatusPayload(taskStatus.status),
|
|
||||||
sqlQuery,
|
|
||||||
queryContext,
|
|
||||||
error: taskStatus.status.error
|
|
||||||
? {
|
|
||||||
error: {
|
|
||||||
errorCode: 'AsyncError',
|
|
||||||
errorMessage: JSON.stringify(taskStatus.status.error),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: status === 'FAILED'
|
|
||||||
? {
|
|
||||||
error: {
|
|
||||||
errorCode: 'UnknownError',
|
|
||||||
errorMessage:
|
|
||||||
'Execution failed, there is no detail information, and there is no error in the status response',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
destination: undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static fromTaskReport(taskReport: MsqTaskReportResponse): Execution {
|
static fromTaskReport(taskReport: MsqTaskReportResponse): Execution {
|
||||||
// Must have status set for a valid report
|
// Must have status set for a valid report
|
||||||
const id = deepGet(taskReport, 'multiStageQuery.taskId');
|
const id = deepGet(taskReport, 'multiStageQuery.taskId');
|
||||||
|
@ -424,6 +364,7 @@ export class Execution {
|
||||||
public readonly usageInfo?: UsageInfo;
|
public readonly usageInfo?: UsageInfo;
|
||||||
public readonly stages?: Stages;
|
public readonly stages?: Stages;
|
||||||
public readonly destination?: ExecutionDestination;
|
public readonly destination?: ExecutionDestination;
|
||||||
|
public readonly destinationPages?: ExecutionDestinationPage[];
|
||||||
public readonly result?: QueryResult;
|
public readonly result?: QueryResult;
|
||||||
public readonly error?: ExecutionError;
|
public readonly error?: ExecutionError;
|
||||||
public readonly warnings?: ExecutionError[];
|
public readonly warnings?: ExecutionError[];
|
||||||
|
@ -444,6 +385,7 @@ export class Execution {
|
||||||
this.usageInfo = value.usageInfo;
|
this.usageInfo = value.usageInfo;
|
||||||
this.stages = value.stages;
|
this.stages = value.stages;
|
||||||
this.destination = value.destination;
|
this.destination = value.destination;
|
||||||
|
this.destinationPages = value.destinationPages;
|
||||||
this.result = value.result;
|
this.result = value.result;
|
||||||
this.error = value.error;
|
this.error = value.error;
|
||||||
this.warnings = nonEmptyArray(value.warnings) ? value.warnings : undefined;
|
this.warnings = nonEmptyArray(value.warnings) ? value.warnings : undefined;
|
||||||
|
@ -465,6 +407,7 @@ export class Execution {
|
||||||
usageInfo: this.usageInfo,
|
usageInfo: this.usageInfo,
|
||||||
stages: this.stages,
|
stages: this.stages,
|
||||||
destination: this.destination,
|
destination: this.destination,
|
||||||
|
destinationPages: this.destinationPages,
|
||||||
result: this.result,
|
result: this.result,
|
||||||
error: this.error,
|
error: this.error,
|
||||||
warnings: this.warnings,
|
warnings: this.warnings,
|
||||||
|
@ -494,6 +437,13 @@ export class Execution {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public changeDestinationPages(destinationPages: ExecutionDestinationPage[]): Execution {
|
||||||
|
return new Execution({
|
||||||
|
...this.valueOf(),
|
||||||
|
destinationPages,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public changeResult(result: QueryResult): Execution {
|
public changeResult(result: QueryResult): Execution {
|
||||||
return new Execution({
|
return new Execution({
|
||||||
...this.valueOf(),
|
...this.valueOf(),
|
||||||
|
@ -514,7 +464,7 @@ export class Execution {
|
||||||
value._payload = taskPayload;
|
value._payload = taskPayload;
|
||||||
value.destination = {
|
value.destination = {
|
||||||
...value.destination,
|
...value.destination,
|
||||||
...(deepGet(taskPayload, 'payload.spec.destination') || {}),
|
...deepGet(taskPayload, 'payload.spec.destination'),
|
||||||
};
|
};
|
||||||
value.nativeQuery = deepGet(taskPayload, 'payload.spec.query');
|
value.nativeQuery = deepGet(taskPayload, 'payload.spec.query');
|
||||||
|
|
||||||
|
@ -530,18 +480,23 @@ export class Execution {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public attachErrorFromStatus(status: any): Execution {
|
public updateWithAsyncStatus(statusPayload: AsyncStatusResponse): Execution {
|
||||||
const errorMsg = deepGet(status, 'status.errorMsg');
|
const value = this.valueOf();
|
||||||
|
|
||||||
return new Execution({
|
const { pages, numTotalRows } = statusPayload.result || {};
|
||||||
...this.valueOf(),
|
|
||||||
error: {
|
if (!value.destinationPages && pages) {
|
||||||
error: {
|
value.destinationPages = pages;
|
||||||
errorCode: 'UnknownError',
|
}
|
||||||
errorMessage: errorMsg,
|
|
||||||
},
|
if (typeof value.destination?.numTotalRows !== 'number' && typeof numTotalRows === 'number') {
|
||||||
},
|
value.destination = {
|
||||||
});
|
...(value.destination || { type: 'taskReport' }),
|
||||||
|
numTotalRows,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Execution(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public markDestinationDatasourceLoaded(): Execution {
|
public markDestinationDatasourceLoaded(): Execution {
|
||||||
|
@ -588,20 +543,8 @@ export class Execution {
|
||||||
return destination.dataSource;
|
return destination.dataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getIngestNumRows(): number | undefined {
|
public getOutputNumTotalRows(): number | undefined {
|
||||||
const { destination, stages } = this;
|
return this.destination?.numTotalRows;
|
||||||
|
|
||||||
if (destination?.type === 'dataSource' && typeof destination.numRows === 'number') {
|
|
||||||
return destination.numRows;
|
|
||||||
}
|
|
||||||
|
|
||||||
const lastStage = stages?.getLastStage();
|
|
||||||
if (stages && lastStage && lastStage.definition.processor.type === 'segmentGenerator') {
|
|
||||||
// Assume input0 since we know the segmentGenerator will only ever have one stage input
|
|
||||||
return stages.getTotalCounterForStage(lastStage, 'input0', 'rows');
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public isSuccessfulInsert(): boolean {
|
public isSuccessfulInsert(): boolean {
|
||||||
|
|
|
@ -66,6 +66,7 @@ export interface MsqTaskPayloadResponse {
|
||||||
sqlQueryContext: Record<string, any>;
|
sqlQueryContext: Record<string, any>;
|
||||||
sqlResultsContext: Record<string, any>;
|
sqlResultsContext: Record<string, any>;
|
||||||
sqlTypeNames: string[];
|
sqlTypeNames: string[];
|
||||||
|
nativeTypeNames: string[];
|
||||||
context: Record<string, any>;
|
context: Record<string, any>;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
dataSource: string;
|
dataSource: string;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
import { L, QueryResult } from '@druid-toolkit/query';
|
import { L, QueryResult } from '@druid-toolkit/query';
|
||||||
import type { AxiosResponse, CancelToken } from 'axios';
|
import type { AxiosResponse, CancelToken } from 'axios';
|
||||||
|
|
||||||
import type { AsyncStatusResponse, QueryContext } from '../../druid-models';
|
import type { AsyncStatusResponse, MsqTaskPayloadResponse, QueryContext } from '../../druid-models';
|
||||||
import { Execution } from '../../druid-models';
|
import { Execution } from '../../druid-models';
|
||||||
import { Api } from '../../singletons';
|
import { Api } from '../../singletons';
|
||||||
import {
|
import {
|
||||||
|
@ -48,7 +48,6 @@ function ensureExecutionModeIsSet(context: QueryContext | undefined): QueryConte
|
||||||
export interface SubmitTaskQueryOptions {
|
export interface SubmitTaskQueryOptions {
|
||||||
query: string | Record<string, any>;
|
query: string | Record<string, any>;
|
||||||
context?: QueryContext;
|
context?: QueryContext;
|
||||||
skipResults?: boolean;
|
|
||||||
prefixLines?: number;
|
prefixLines?: number;
|
||||||
cancelToken?: CancelToken;
|
cancelToken?: CancelToken;
|
||||||
preserveOnTermination?: boolean;
|
preserveOnTermination?: boolean;
|
||||||
|
@ -58,15 +57,7 @@ export interface SubmitTaskQueryOptions {
|
||||||
export async function submitTaskQuery(
|
export async function submitTaskQuery(
|
||||||
options: SubmitTaskQueryOptions,
|
options: SubmitTaskQueryOptions,
|
||||||
): Promise<Execution | IntermediateQueryState<Execution>> {
|
): Promise<Execution | IntermediateQueryState<Execution>> {
|
||||||
const {
|
const { query, context, prefixLines, cancelToken, preserveOnTermination, onSubmitted } = options;
|
||||||
query,
|
|
||||||
context,
|
|
||||||
skipResults,
|
|
||||||
prefixLines,
|
|
||||||
cancelToken,
|
|
||||||
preserveOnTermination,
|
|
||||||
onSubmitted,
|
|
||||||
} = options;
|
|
||||||
|
|
||||||
let sqlQuery: string;
|
let sqlQuery: string;
|
||||||
let jsonQuery: Record<string, any>;
|
let jsonQuery: Record<string, any>;
|
||||||
|
@ -123,10 +114,6 @@ export async function submitTaskQuery(
|
||||||
onSubmitted(execution.id);
|
onSubmitted(execution.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipResults) {
|
|
||||||
execution = execution.changeDestination({ type: 'download' });
|
|
||||||
}
|
|
||||||
|
|
||||||
execution = await updateExecutionWithDatasourceLoadedIfNeeded(execution, cancelToken);
|
execution = await updateExecutionWithDatasourceLoadedIfNeeded(execution, cancelToken);
|
||||||
|
|
||||||
if (execution.isFullyComplete()) return execution;
|
if (execution.isFullyComplete()) return execution;
|
||||||
|
@ -178,7 +165,7 @@ export async function updateExecutionWithTaskIfNeeded(
|
||||||
|
|
||||||
export async function getTaskExecution(
|
export async function getTaskExecution(
|
||||||
id: string,
|
id: string,
|
||||||
taskPayloadOverride?: { payload: any; task: string },
|
taskPayloadOverride?: MsqTaskPayloadResponse,
|
||||||
cancelToken?: CancelToken,
|
cancelToken?: CancelToken,
|
||||||
): Promise<Execution> {
|
): Promise<Execution> {
|
||||||
const encodedId = Api.encodePath(id);
|
const encodedId = Api.encodePath(id);
|
||||||
|
@ -221,7 +208,7 @@ export async function getTaskExecution(
|
||||||
execution = Execution.fromAsyncStatus(statusResp.data);
|
execution = Execution.fromAsyncStatus(statusResp.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
let taskPayload: any = taskPayloadOverride;
|
let taskPayload = taskPayloadOverride;
|
||||||
if (USE_TASK_PAYLOAD && !taskPayload) {
|
if (USE_TASK_PAYLOAD && !taskPayload) {
|
||||||
try {
|
try {
|
||||||
taskPayload = (
|
taskPayload = (
|
||||||
|
@ -237,6 +224,18 @@ export async function getTaskExecution(
|
||||||
execution = execution.updateWithTaskPayload(taskPayload);
|
execution = execution.updateWithTaskPayload(taskPayload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Still have to pull the destination page info from the async status
|
||||||
|
if (execution.status === 'SUCCESS' && !execution.destinationPages) {
|
||||||
|
const statusResp = await Api.instance.get<AsyncStatusResponse>(
|
||||||
|
`/druid/v2/sql/statements/${encodedId}`,
|
||||||
|
{
|
||||||
|
cancelToken,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
execution = execution.updateWithAsyncStatus(statusResp.data);
|
||||||
|
}
|
||||||
|
|
||||||
if (execution.hasPotentiallyStuckStage()) {
|
if (execution.hasPotentiallyStuckStage()) {
|
||||||
const capacityInfo = await maybeGetClusterCapacity();
|
const capacityInfo = await maybeGetClusterCapacity();
|
||||||
if (capacityInfo) {
|
if (capacityInfo) {
|
||||||
|
|
|
@ -22,35 +22,39 @@ import { Api } from '../singletons';
|
||||||
|
|
||||||
import { downloadFile } from './download';
|
import { downloadFile } from './download';
|
||||||
|
|
||||||
interface QueryDetailArchive {
|
export interface QueryDetailArchive {
|
||||||
id: string;
|
id: string;
|
||||||
detailArchiveVersion: number;
|
detailArchiveVersion: number;
|
||||||
status?: any;
|
status?: any;
|
||||||
reports?: any;
|
reports?: any;
|
||||||
payload?: any;
|
payload?: any;
|
||||||
|
statementsStatus?: any;
|
||||||
serverStatus?: any;
|
serverStatus?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadQueryDetailArchive(id: string) {
|
export async function downloadQueryDetailArchive(id: string) {
|
||||||
|
const encodedId = Api.encodePath(id);
|
||||||
const profile: QueryDetailArchive = {
|
const profile: QueryDetailArchive = {
|
||||||
id,
|
id,
|
||||||
detailArchiveVersion: 2,
|
detailArchiveVersion: 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
profile.status = (
|
profile.status = (await Api.instance.get(`/druid/indexer/v1/task/${encodedId}/status`)).data;
|
||||||
await Api.instance.get(`/druid/indexer/v1/task/${Api.encodePath(id)}/status`)
|
|
||||||
).data;
|
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
profile.reports = (
|
profile.reports = (await Api.instance.get(`/druid/indexer/v1/task/${encodedId}/reports`)).data;
|
||||||
await Api.instance.get(`/druid/indexer/v1/task/${Api.encodePath(id)}/reports`)
|
|
||||||
).data;
|
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
profile.payload = (await Api.instance.get(`/druid/indexer/v1/task/${Api.encodePath(id)}`)).data;
|
profile.payload = (await Api.instance.get(`/druid/indexer/v1/task/${encodedId}`)).data;
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
profile.statementsStatus = (
|
||||||
|
await Api.instance.get(`/druid/v2/sql/statements/${encodedId}`)
|
||||||
|
).data;
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -22,6 +22,23 @@ import * as JSONBig from 'json-bigint-native';
|
||||||
|
|
||||||
import { stringifyValue } from './general';
|
import { stringifyValue } from './general';
|
||||||
|
|
||||||
|
export function downloadUrl(url: string, filename: string) {
|
||||||
|
// Create a link and set the URL using `createObjectURL`
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.style.display = 'none';
|
||||||
|
link.href = url;
|
||||||
|
link.download = filename;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
|
||||||
|
// To make this work on Firefox we need to wait
|
||||||
|
// a little while before removing it.
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!link.parentNode) return;
|
||||||
|
link.parentNode.removeChild(link);
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
|
||||||
export function formatForFormat(s: null | string | number | Date, format: 'csv' | 'tsv'): string {
|
export function formatForFormat(s: null | string | number | Date, format: 'csv' | 'tsv'): string {
|
||||||
// stringify and remove line break
|
// stringify and remove line break
|
||||||
const str = stringifyValue(s).replace(/(?:\r\n|\r|\n)/g, ' ');
|
const str = stringifyValue(s).replace(/(?:\r\n|\r|\n)/g, ' ');
|
||||||
|
|
|
@ -302,8 +302,21 @@ export function formatDurationHybrid(ms: NumberLike): string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pluralize(word: string): string {
|
||||||
|
// Ignoring irregular plurals.
|
||||||
|
if (/(s|x|z|ch|sh)$/.test(word)) {
|
||||||
|
return word + 'es';
|
||||||
|
} else if (/([^aeiou])y$/.test(word)) {
|
||||||
|
return word.slice(0, -1) + 'ies';
|
||||||
|
} else if (/(f|fe)$/.test(word)) {
|
||||||
|
return word.replace(/fe?$/, 'ves');
|
||||||
|
} else {
|
||||||
|
return word + 's';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function pluralIfNeeded(n: NumberLike, singular: string, plural?: string): string {
|
export function pluralIfNeeded(n: NumberLike, singular: string, plural?: string): string {
|
||||||
if (!plural) plural = singular + 's';
|
if (!plural) plural = pluralize(singular);
|
||||||
return `${formatInteger(n)} ${n === 1 ? singular : plural}`;
|
return `${formatInteger(n)} ${n === 1 ? singular : plural}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import '../../../variables';
|
||||||
|
|
||||||
|
.destination-pages-dialog {
|
||||||
|
&.#{$bp-ns}-dialog {
|
||||||
|
min-width: 700px;
|
||||||
|
min-height: 480px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Button, Classes, Dialog } from '@blueprintjs/core';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import type { Execution } from '../../../druid-models';
|
||||||
|
import { DestinationPagesPane } from '../destination-pages-pane/destination-pages-pane';
|
||||||
|
|
||||||
|
import './destination-pages-dialog.scss';
|
||||||
|
|
||||||
|
export interface DestinationPagesDialogProps {
|
||||||
|
execution: Execution;
|
||||||
|
onClose(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DestinationPagesDialog = React.memo(function DestinationPagesDialog(
|
||||||
|
props: DestinationPagesDialogProps,
|
||||||
|
) {
|
||||||
|
const { execution, onClose } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog className="destination-pages-dialog" isOpen onClose={onClose} title="Result pages">
|
||||||
|
<div className={Classes.DIALOG_BODY}>
|
||||||
|
<DestinationPagesPane execution={execution} />
|
||||||
|
</div>
|
||||||
|
<div className={Classes.DIALOG_FOOTER}>
|
||||||
|
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||||
|
<Button text="Close" onClick={onClose} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
});
|
|
@ -0,0 +1,135 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { AnchorButton, Button } from '@blueprintjs/core';
|
||||||
|
import { IconNames } from '@blueprintjs/icons';
|
||||||
|
import React from 'react';
|
||||||
|
import ReactTable from 'react-table';
|
||||||
|
|
||||||
|
import type { Execution } from '../../../druid-models';
|
||||||
|
import { Api, UrlBaser } from '../../../singletons';
|
||||||
|
import {
|
||||||
|
clamp,
|
||||||
|
downloadUrl,
|
||||||
|
formatBytes,
|
||||||
|
formatInteger,
|
||||||
|
pluralIfNeeded,
|
||||||
|
wait,
|
||||||
|
} from '../../../utils';
|
||||||
|
|
||||||
|
const MAX_DETAIL_ROWS = 20;
|
||||||
|
|
||||||
|
interface DestinationPagesPaneProps {
|
||||||
|
execution: Execution;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DestinationPagesPane = React.memo(function DestinationPagesPane(
|
||||||
|
props: DestinationPagesPaneProps,
|
||||||
|
) {
|
||||||
|
const { execution } = props;
|
||||||
|
const destination = execution.destination;
|
||||||
|
const pages = execution.destinationPages;
|
||||||
|
if (!pages) return null;
|
||||||
|
const id = Api.encodePath(execution.id);
|
||||||
|
|
||||||
|
const numTotalRows = destination?.numTotalRows;
|
||||||
|
|
||||||
|
function getPageUrl(pageIndex: number) {
|
||||||
|
return UrlBaser.base(`/druid/v2/sql/statements/${id}/results?page=${pageIndex}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPageFilename(pageIndex: number) {
|
||||||
|
return `${id}_page${pageIndex}.jsonl`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function downloadAllPages() {
|
||||||
|
if (!pages) return;
|
||||||
|
for (let i = 0; i < pages.length; i++) {
|
||||||
|
downloadUrl(getPageUrl(i), getPageFilename(i));
|
||||||
|
await wait(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="execution-details-pane">
|
||||||
|
<p>
|
||||||
|
{`${
|
||||||
|
typeof numTotalRows === 'number' ? pluralIfNeeded(numTotalRows, 'row') : 'Results'
|
||||||
|
} have been written to ${pluralIfNeeded(pages.length, 'page')}. `}
|
||||||
|
{pages.length > 1 && (
|
||||||
|
<Button
|
||||||
|
icon={IconNames.DOWNLOAD}
|
||||||
|
text={`Download all data (as ${pluralIfNeeded(pages.length, 'file')})`}
|
||||||
|
minimal
|
||||||
|
onClick={() => void downloadAllPages()}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<ReactTable
|
||||||
|
className="padded-header"
|
||||||
|
data={pages}
|
||||||
|
loading={false}
|
||||||
|
sortable
|
||||||
|
defaultSorted={[{ id: 'id', desc: false }]}
|
||||||
|
defaultPageSize={clamp(pages.length, 1, MAX_DETAIL_ROWS)}
|
||||||
|
showPagination={pages.length > MAX_DETAIL_ROWS}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
Header: 'Page number',
|
||||||
|
id: 'id',
|
||||||
|
accessor: 'id',
|
||||||
|
className: 'padded',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Number of rows',
|
||||||
|
id: 'numRows',
|
||||||
|
accessor: 'numRows',
|
||||||
|
className: 'padded',
|
||||||
|
width: 200,
|
||||||
|
Cell: ({ value }) => formatInteger(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: 'Size',
|
||||||
|
id: 'sizeInBytes',
|
||||||
|
accessor: 'sizeInBytes',
|
||||||
|
className: 'padded',
|
||||||
|
width: 200,
|
||||||
|
Cell: ({ value }) => formatBytes(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Header: '',
|
||||||
|
id: 'download',
|
||||||
|
accessor: 'id',
|
||||||
|
sortable: false,
|
||||||
|
width: 300,
|
||||||
|
Cell: ({ value }) => (
|
||||||
|
<AnchorButton
|
||||||
|
icon={IconNames.DOWNLOAD}
|
||||||
|
text="download .jsonl"
|
||||||
|
minimal
|
||||||
|
href={getPageUrl(value)}
|
||||||
|
download={getPageFilename(value)}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
|
@ -23,6 +23,7 @@ exports[`ExecutionDetailsPane matches snapshot no init tab 1`] = `
|
||||||
"label": "Native query",
|
"label": "Native query",
|
||||||
},
|
},
|
||||||
undefined,
|
undefined,
|
||||||
|
undefined,
|
||||||
Object {
|
Object {
|
||||||
"icon": "error",
|
"icon": "error",
|
||||||
"id": "error",
|
"id": "error",
|
||||||
|
@ -38,7 +39,10 @@ exports[`ExecutionDetailsPane matches snapshot no init tab 1`] = `
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
General info for query-8f889312-e989-4b4c-9895-485a1fe796d3 ingesting into "kttm-blank-lines"
|
General info for query-af8a263d-213f-418e-ad8d-37d55beff59b ingesting into "kttm-blank-lines"
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Results written to dataSource
|
||||||
</p>
|
</p>
|
||||||
<Memo(ExecutionErrorPane)
|
<Memo(ExecutionErrorPane)
|
||||||
execution={
|
execution={
|
||||||
|
@ -50,10 +54,14 @@ exports[`ExecutionDetailsPane matches snapshot no init tab 1`] = `
|
||||||
"useLineageBasedSegmentAllocation": true,
|
"useLineageBasedSegmentAllocation": true,
|
||||||
},
|
},
|
||||||
"dataSource": "kttm-blank-lines",
|
"dataSource": "kttm-blank-lines",
|
||||||
"groupId": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"groupId": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
|
"nativeTypeNames": Array [
|
||||||
|
"LONG",
|
||||||
|
"STRING",
|
||||||
|
],
|
||||||
"resource": Object {
|
"resource": Object {
|
||||||
"availabilityGroup": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"availabilityGroup": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"requiredCapacity": 1,
|
"requiredCapacity": 1,
|
||||||
},
|
},
|
||||||
"spec": Object {
|
"spec": Object {
|
||||||
|
@ -83,15 +91,16 @@ exports[`ExecutionDetailsPane matches snapshot no init tab 1`] = `
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -158,13 +167,14 @@ FROM TABLE(
|
||||||
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
||||||
PARTITIONED BY DAY",
|
PARTITIONED BY DAY",
|
||||||
"sqlQueryContext": Object {
|
"sqlQueryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"sqlResultsContext": Object {
|
"sqlResultsContext": Object {
|
||||||
|
@ -178,7 +188,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"type": "query_controller",
|
"type": "query_controller",
|
||||||
},
|
},
|
||||||
"task": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"task": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
},
|
},
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": Object {
|
"destination": Object {
|
||||||
|
@ -189,7 +199,8 @@ PARTITIONED BY DAY",
|
||||||
"segmentGranularity": "DAY",
|
"segmentGranularity": "DAY",
|
||||||
"type": "dataSource",
|
"type": "dataSource",
|
||||||
},
|
},
|
||||||
"duration": 14760,
|
"destinationPages": undefined,
|
||||||
|
"duration": 14545,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": Object {
|
"error": Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -199,9 +210,9 @@ PARTITIONED BY DAY",
|
||||||
"rootErrorCode": "CannotParseExternalData",
|
"rootErrorCode": "CannotParseExternalData",
|
||||||
},
|
},
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"nativeQuery": Object {
|
"nativeQuery": Object {
|
||||||
"columns": Array [
|
"columns": Array [
|
||||||
"agent_type",
|
"agent_type",
|
||||||
|
@ -209,15 +220,16 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -267,6 +279,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"queryContext": Object {
|
"queryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
|
@ -337,7 +350,7 @@ PARTITIONED BY DAY",
|
||||||
"stages": Array [
|
"stages": Array [
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_0",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_0",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"inputFormat": Object {
|
"inputFormat": Object {
|
||||||
|
@ -375,15 +388,16 @@ PARTITIONED BY DAY",
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__timeColumn": "v0",
|
"__timeColumn": "v0",
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -471,16 +485,16 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"duration": 14412,
|
"duration": 14193,
|
||||||
"phase": "FAILED",
|
"phase": "FAILED",
|
||||||
"sort": true,
|
"sort": true,
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"startTime": "2023-06-19T05:37:48.952Z",
|
"startTime": "2023-08-01T04:20:25.296Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_1",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_1",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"stage": 0,
|
"stage": 0,
|
||||||
|
@ -550,7 +564,7 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"startTime": 2023-06-19T05:37:48.605Z,
|
"startTime": 2023-08-01T04:20:24.945Z,
|
||||||
"status": "FAILED",
|
"status": "FAILED",
|
||||||
"usageInfo": Object {
|
"usageInfo": Object {
|
||||||
"pendingTasks": 0,
|
"pendingTasks": 0,
|
||||||
|
@ -567,19 +581,20 @@ PARTITIONED BY DAY",
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -596,11 +611,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -612,19 +627,20 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -641,11 +657,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -661,10 +677,14 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
"useLineageBasedSegmentAllocation": true,
|
"useLineageBasedSegmentAllocation": true,
|
||||||
},
|
},
|
||||||
"dataSource": "kttm-blank-lines",
|
"dataSource": "kttm-blank-lines",
|
||||||
"groupId": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"groupId": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
|
"nativeTypeNames": Array [
|
||||||
|
"LONG",
|
||||||
|
"STRING",
|
||||||
|
],
|
||||||
"resource": Object {
|
"resource": Object {
|
||||||
"availabilityGroup": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"availabilityGroup": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"requiredCapacity": 1,
|
"requiredCapacity": 1,
|
||||||
},
|
},
|
||||||
"spec": Object {
|
"spec": Object {
|
||||||
|
@ -694,15 +714,16 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -769,13 +790,14 @@ FROM TABLE(
|
||||||
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
||||||
PARTITIONED BY DAY",
|
PARTITIONED BY DAY",
|
||||||
"sqlQueryContext": Object {
|
"sqlQueryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"sqlResultsContext": Object {
|
"sqlResultsContext": Object {
|
||||||
|
@ -789,7 +811,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"type": "query_controller",
|
"type": "query_controller",
|
||||||
},
|
},
|
||||||
"task": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"task": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
},
|
},
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": Object {
|
"destination": Object {
|
||||||
|
@ -800,7 +822,8 @@ PARTITIONED BY DAY",
|
||||||
"segmentGranularity": "DAY",
|
"segmentGranularity": "DAY",
|
||||||
"type": "dataSource",
|
"type": "dataSource",
|
||||||
},
|
},
|
||||||
"duration": 14760,
|
"destinationPages": undefined,
|
||||||
|
"duration": 14545,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": Object {
|
"error": Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -810,9 +833,9 @@ PARTITIONED BY DAY",
|
||||||
"rootErrorCode": "CannotParseExternalData",
|
"rootErrorCode": "CannotParseExternalData",
|
||||||
},
|
},
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"nativeQuery": Object {
|
"nativeQuery": Object {
|
||||||
"columns": Array [
|
"columns": Array [
|
||||||
"agent_type",
|
"agent_type",
|
||||||
|
@ -820,15 +843,16 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -878,6 +902,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"queryContext": Object {
|
"queryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
|
@ -948,7 +973,7 @@ PARTITIONED BY DAY",
|
||||||
"stages": Array [
|
"stages": Array [
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_0",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_0",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"inputFormat": Object {
|
"inputFormat": Object {
|
||||||
|
@ -986,15 +1011,16 @@ PARTITIONED BY DAY",
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__timeColumn": "v0",
|
"__timeColumn": "v0",
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -1082,16 +1108,16 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"duration": 14412,
|
"duration": 14193,
|
||||||
"phase": "FAILED",
|
"phase": "FAILED",
|
||||||
"sort": true,
|
"sort": true,
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"startTime": "2023-06-19T05:37:48.952Z",
|
"startTime": "2023-08-01T04:20:25.296Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_1",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_1",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"stage": 0,
|
"stage": 0,
|
||||||
|
@ -1161,7 +1187,7 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"startTime": 2023-06-19T05:37:48.605Z,
|
"startTime": 2023-08-01T04:20:24.945Z,
|
||||||
"status": "FAILED",
|
"status": "FAILED",
|
||||||
"usageInfo": Object {
|
"usageInfo": Object {
|
||||||
"pendingTasks": 0,
|
"pendingTasks": 0,
|
||||||
|
@ -1178,19 +1204,20 @@ PARTITIONED BY DAY",
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -1207,11 +1234,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -1223,19 +1250,20 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -1252,11 +1280,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -1292,6 +1320,7 @@ exports[`ExecutionDetailsPane matches snapshot with init tab 1`] = `
|
||||||
"label": "Native query",
|
"label": "Native query",
|
||||||
},
|
},
|
||||||
undefined,
|
undefined,
|
||||||
|
undefined,
|
||||||
Object {
|
Object {
|
||||||
"icon": "error",
|
"icon": "error",
|
||||||
"id": "error",
|
"id": "error",
|
||||||
|
@ -1315,10 +1344,14 @@ exports[`ExecutionDetailsPane matches snapshot with init tab 1`] = `
|
||||||
"useLineageBasedSegmentAllocation": true,
|
"useLineageBasedSegmentAllocation": true,
|
||||||
},
|
},
|
||||||
"dataSource": "kttm-blank-lines",
|
"dataSource": "kttm-blank-lines",
|
||||||
"groupId": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"groupId": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
|
"nativeTypeNames": Array [
|
||||||
|
"LONG",
|
||||||
|
"STRING",
|
||||||
|
],
|
||||||
"resource": Object {
|
"resource": Object {
|
||||||
"availabilityGroup": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"availabilityGroup": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"requiredCapacity": 1,
|
"requiredCapacity": 1,
|
||||||
},
|
},
|
||||||
"spec": Object {
|
"spec": Object {
|
||||||
|
@ -1348,15 +1381,16 @@ exports[`ExecutionDetailsPane matches snapshot with init tab 1`] = `
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -1423,13 +1457,14 @@ FROM TABLE(
|
||||||
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
) EXTEND (\\"timestamp\\" VARCHAR, \\"agent_type\\" VARCHAR)
|
||||||
PARTITIONED BY DAY",
|
PARTITIONED BY DAY",
|
||||||
"sqlQueryContext": Object {
|
"sqlQueryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"sqlResultsContext": Object {
|
"sqlResultsContext": Object {
|
||||||
|
@ -1443,7 +1478,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"type": "query_controller",
|
"type": "query_controller",
|
||||||
},
|
},
|
||||||
"task": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"task": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
},
|
},
|
||||||
"capacityInfo": undefined,
|
"capacityInfo": undefined,
|
||||||
"destination": Object {
|
"destination": Object {
|
||||||
|
@ -1454,7 +1489,8 @@ PARTITIONED BY DAY",
|
||||||
"segmentGranularity": "DAY",
|
"segmentGranularity": "DAY",
|
||||||
"type": "dataSource",
|
"type": "dataSource",
|
||||||
},
|
},
|
||||||
"duration": 14760,
|
"destinationPages": undefined,
|
||||||
|
"duration": 14545,
|
||||||
"engine": "sql-msq-task",
|
"engine": "sql-msq-task",
|
||||||
"error": Object {
|
"error": Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -1464,9 +1500,9 @@ PARTITIONED BY DAY",
|
||||||
"rootErrorCode": "CannotParseExternalData",
|
"rootErrorCode": "CannotParseExternalData",
|
||||||
},
|
},
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
"id": "query-8f889312-e989-4b4c-9895-485a1fe796d3",
|
"id": "query-af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"nativeQuery": Object {
|
"nativeQuery": Object {
|
||||||
"columns": Array [
|
"columns": Array [
|
||||||
"agent_type",
|
"agent_type",
|
||||||
|
@ -1474,15 +1510,16 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -1532,6 +1569,7 @@ PARTITIONED BY DAY",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"queryContext": Object {
|
"queryContext": Object {
|
||||||
|
"executionMode": "async",
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
|
@ -1602,7 +1640,7 @@ PARTITIONED BY DAY",
|
||||||
"stages": Array [
|
"stages": Array [
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_0",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_0",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"inputFormat": Object {
|
"inputFormat": Object {
|
||||||
|
@ -1640,15 +1678,16 @@ PARTITIONED BY DAY",
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__timeColumn": "v0",
|
"__timeColumn": "v0",
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 2,
|
"maxParseExceptions": 2,
|
||||||
"queryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"queryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
"sqlInsertSegmentGranularity": "\\"DAY\\"",
|
||||||
"sqlQueryId": "8f889312-e989-4b4c-9895-485a1fe796d3",
|
"sqlQueryId": "af8a263d-213f-418e-ad8d-37d55beff59b",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -1736,16 +1775,16 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"duration": 14412,
|
"duration": 14193,
|
||||||
"phase": "FAILED",
|
"phase": "FAILED",
|
||||||
"sort": true,
|
"sort": true,
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"startTime": "2023-06-19T05:37:48.952Z",
|
"startTime": "2023-08-01T04:20:25.296Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "d337a3d8-e361-4795-8eaa-97ced72d9a7b_1",
|
"id": "f635e36d-6b90-4b74-ad5e-a179c99f0ddc_1",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"stage": 0,
|
"stage": 0,
|
||||||
|
@ -1815,7 +1854,7 @@ PARTITIONED BY DAY",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"startTime": 2023-06-19T05:37:48.605Z,
|
"startTime": 2023-08-01T04:20:24.945Z,
|
||||||
"status": "FAILED",
|
"status": "FAILED",
|
||||||
"usageInfo": Object {
|
"usageInfo": Object {
|
||||||
"pendingTasks": 0,
|
"pendingTasks": 0,
|
||||||
|
@ -1832,19 +1871,20 @@ PARTITIONED BY DAY",
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -1861,11 +1901,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"error": Object {
|
"error": Object {
|
||||||
|
@ -1877,19 +1917,20 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.findNextIteratorIfNecessary(CloseableIterator.java:74)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$2.next(CloseableIterator.java:108)
|
||||||
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
at org.apache.druid.java.util.common.parsers.CloseableIterator$1.next(CloseableIterator.java:52)
|
||||||
at org.apache.druid.msq.input.external.ExternalInputSliceReader$1$1.hasNext(ExternalInputSliceReader.java:183)
|
at org.apache.druid.msq.input.external.ExternalSegment$1$1.hasNext(ExternalSegment.java:95)
|
||||||
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
at org.apache.druid.java.util.common.guava.BaseSequence$1.next(BaseSequence.java:115)
|
||||||
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
at org.apache.druid.segment.RowWalker.advance(RowWalker.java:70)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
at org.apache.druid.segment.RowBasedCursor.advanceUninterruptibly(RowBasedCursor.java:110)
|
||||||
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
at org.apache.druid.segment.RowBasedCursor.advance(RowBasedCursor.java:103)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:246)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeeded(ScanQueryFrameProcessor.java:275)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:173)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.populateFrameWriterAndFlushIfNeededWithExceptionHandling(ScanQueryFrameProcessor.java:242)
|
||||||
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runWithSegment(ScanQueryFrameProcessor.java:181)
|
||||||
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
at org.apache.druid.msq.querykit.BaseLeafFrameProcessor.runIncrementally(BaseLeafFrameProcessor.java:159)
|
||||||
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:138)
|
at org.apache.druid.msq.querykit.scan.ScanQueryFrameProcessor.runIncrementally(ScanQueryFrameProcessor.java:146)
|
||||||
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
at org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:75)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:229)
|
||||||
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
at org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:137)
|
||||||
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:820)
|
at org.apache.druid.msq.exec.WorkerImpl$1$2.run(WorkerImpl.java:837)
|
||||||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
|
||||||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
|
||||||
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
at org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:251)
|
||||||
|
@ -1906,11 +1947,11 @@ Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No conte
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:75)
|
||||||
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
at org.apache.druid.data.input.impl.JsonLineReader.parseInputRows(JsonLineReader.java:48)
|
||||||
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
at org.apache.druid.data.input.IntermediateRowParsingReader$1.hasNext(IntermediateRowParsingReader.java:71)
|
||||||
... 22 more
|
... 23 more
|
||||||
",
|
",
|
||||||
"host": "localhost:8101",
|
"host": "localhost:8101",
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"taskId": "query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0",
|
"taskId": "query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { IconNames } from '@blueprintjs/icons';
|
import { IconNames } from '@blueprintjs/icons';
|
||||||
import { T } from '@druid-toolkit/query';
|
import { T } from '@druid-toolkit/query';
|
||||||
import * as JSONBig from 'json-bigint-native';
|
import * as JSONBig from 'json-bigint-native';
|
||||||
|
@ -22,6 +23,8 @@ import React, { useState } from 'react';
|
||||||
|
|
||||||
import { FancyTabPane } from '../../../components';
|
import { FancyTabPane } from '../../../components';
|
||||||
import type { Execution } from '../../../druid-models';
|
import type { Execution } from '../../../druid-models';
|
||||||
|
import { pluralIfNeeded } from '../../../utils';
|
||||||
|
import { DestinationPagesPane } from '../destination-pages-pane/destination-pages-pane';
|
||||||
import { ExecutionErrorPane } from '../execution-error-pane/execution-error-pane';
|
import { ExecutionErrorPane } from '../execution-error-pane/execution-error-pane';
|
||||||
import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane';
|
import { ExecutionStagesPane } from '../execution-stages-pane/execution-stages-pane';
|
||||||
import { ExecutionWarningsPane } from '../execution-warnings-pane/execution-warnings-pane';
|
import { ExecutionWarningsPane } from '../execution-warnings-pane/execution-warnings-pane';
|
||||||
|
@ -30,7 +33,14 @@ import { ResultTablePane } from '../result-table-pane/result-table-pane';
|
||||||
|
|
||||||
import './execution-details-pane.scss';
|
import './execution-details-pane.scss';
|
||||||
|
|
||||||
export type ExecutionDetailsTab = 'general' | 'sql' | 'native' | 'result' | 'error' | 'warnings';
|
export type ExecutionDetailsTab =
|
||||||
|
| 'general'
|
||||||
|
| 'sql'
|
||||||
|
| 'native'
|
||||||
|
| 'result'
|
||||||
|
| 'pages'
|
||||||
|
| 'error'
|
||||||
|
| 'warnings';
|
||||||
|
|
||||||
interface ExecutionDetailsPaneProps {
|
interface ExecutionDetailsPaneProps {
|
||||||
execution: Execution;
|
execution: Execution;
|
||||||
|
@ -53,6 +63,14 @@ export const ExecutionDetailsPane = React.memo(function ExecutionDetailsPane(
|
||||||
<p>{`General info for ${execution.id}${
|
<p>{`General info for ${execution.id}${
|
||||||
ingestDatasource ? ` ingesting into ${T(ingestDatasource)}` : ''
|
ingestDatasource ? ` ingesting into ${T(ingestDatasource)}` : ''
|
||||||
}`}</p>
|
}`}</p>
|
||||||
|
{execution.destination && (
|
||||||
|
<p>
|
||||||
|
{`Results written to ${execution.destination.type}`}
|
||||||
|
{execution.destinationPages
|
||||||
|
? ` (${pluralIfNeeded(execution.destinationPages.length, 'page')})`
|
||||||
|
: undefined}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
{execution.error && <ExecutionErrorPane execution={execution} />}
|
{execution.error && <ExecutionErrorPane execution={execution} />}
|
||||||
{execution.stages ? (
|
{execution.stages ? (
|
||||||
<ExecutionStagesPane
|
<ExecutionStagesPane
|
||||||
|
@ -92,6 +110,10 @@ export const ExecutionDetailsPane = React.memo(function ExecutionDetailsPane(
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
case 'pages':
|
||||||
|
if (!execution.destinationPages) return;
|
||||||
|
return <DestinationPagesPane execution={execution} />;
|
||||||
|
|
||||||
case 'error':
|
case 'error':
|
||||||
return <ExecutionErrorPane execution={execution} />;
|
return <ExecutionErrorPane execution={execution} />;
|
||||||
|
|
||||||
|
@ -129,6 +151,11 @@ export const ExecutionDetailsPane = React.memo(function ExecutionDetailsPane(
|
||||||
label: 'Results',
|
label: 'Results',
|
||||||
icon: IconNames.TH,
|
icon: IconNames.TH,
|
||||||
},
|
},
|
||||||
|
execution.destinationPages && {
|
||||||
|
id: 'pages',
|
||||||
|
label: 'Result pages',
|
||||||
|
icon: IconNames.APPLICATIONS,
|
||||||
|
},
|
||||||
execution.error && {
|
execution.error && {
|
||||||
id: 'error',
|
id: 'error',
|
||||||
label: 'Error',
|
label: 'Error',
|
||||||
|
|
|
@ -21,7 +21,7 @@ exports[`ExecutionErrorPane matches snapshot 1`] = `
|
||||||
<div>
|
<div>
|
||||||
Failed task ID:
|
Failed task ID:
|
||||||
<Memo(ClickToCopy)
|
<Memo(ClickToCopy)
|
||||||
text="query-8f889312-e989-4b4c-9895-485a1fe796d3-worker0_0"
|
text="query-af8a263d-213f-418e-ad8d-37d55beff59b-worker0_0"
|
||||||
/>
|
/>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
(on host:
|
(on host:
|
||||||
|
|
|
@ -158,7 +158,7 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
Array [
|
Array [
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "8af42220-2724-4a76-b39f-c2f98df2de69_0",
|
"id": "ad318360-2ccf-4afc-b221-27c8704bf4fe_0",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"inputFormat": Object {
|
"inputFormat": Object {
|
||||||
|
@ -196,15 +196,16 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
"context": Object {
|
"context": Object {
|
||||||
"__timeColumn": "v0",
|
"__timeColumn": "v0",
|
||||||
"__user": "allowAll",
|
"__user": "allowAll",
|
||||||
|
"executionMode": "async",
|
||||||
"finalize": false,
|
"finalize": false,
|
||||||
"finalizeAggregations": false,
|
"finalizeAggregations": false,
|
||||||
"groupByEnableMultiValueUnnesting": false,
|
"groupByEnableMultiValueUnnesting": false,
|
||||||
"maxNumTasks": 2,
|
"maxNumTasks": 2,
|
||||||
"maxParseExceptions": 0,
|
"maxParseExceptions": 0,
|
||||||
"queryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"queryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
"scanSignature": "[{\\"name\\":\\"agent_type\\",\\"type\\":\\"STRING\\"},{\\"name\\":\\"v0\\",\\"type\\":\\"LONG\\"}]",
|
||||||
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
"sqlInsertSegmentGranularity": "{\\"type\\":\\"all\\"}",
|
||||||
"sqlQueryId": "5aa683e2-a6ee-4655-a834-a643e91055b1",
|
"sqlQueryId": "93a855fa-c35a-48df-b596-6bc98eed1101",
|
||||||
"sqlReplaceTimeChunks": "all",
|
"sqlReplaceTimeChunks": "all",
|
||||||
},
|
},
|
||||||
"dataSource": Object {
|
"dataSource": Object {
|
||||||
|
@ -283,17 +284,17 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"duration": 20483,
|
"duration": 21324,
|
||||||
"partitionCount": 1,
|
"partitionCount": 1,
|
||||||
"phase": "FINISHED",
|
"phase": "FINISHED",
|
||||||
"sort": true,
|
"sort": true,
|
||||||
"stageNumber": 0,
|
"stageNumber": 0,
|
||||||
"startTime": "2023-06-19T05:39:26.711Z",
|
"startTime": "2023-08-01T03:12:59.865Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"definition": Object {
|
"definition": Object {
|
||||||
"id": "8af42220-2724-4a76-b39f-c2f98df2de69_1",
|
"id": "ad318360-2ccf-4afc-b221-27c8704bf4fe_1",
|
||||||
"input": Array [
|
"input": Array [
|
||||||
Object {
|
Object {
|
||||||
"stage": 0,
|
"stage": 0,
|
||||||
|
@ -359,11 +360,11 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
},
|
},
|
||||||
"signature": Array [],
|
"signature": Array [],
|
||||||
},
|
},
|
||||||
"duration": 2381,
|
"duration": 2070,
|
||||||
"partitionCount": 1,
|
"partitionCount": 1,
|
||||||
"phase": "FINISHED",
|
"phase": "FINISHED",
|
||||||
"stageNumber": 1,
|
"stageNumber": 1,
|
||||||
"startTime": "2023-06-19T05:39:47.166Z",
|
"startTime": "2023-08-01T03:13:21.156Z",
|
||||||
"workerCount": 1,
|
"workerCount": 1,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -23,6 +23,7 @@ import AceEditor from 'react-ace';
|
||||||
|
|
||||||
import { Execution } from '../../../druid-models';
|
import { Execution } from '../../../druid-models';
|
||||||
import { AppToaster } from '../../../singletons';
|
import { AppToaster } from '../../../singletons';
|
||||||
|
import type { QueryDetailArchive } from '../../../utils';
|
||||||
import { offsetToRowColumn } from '../../../utils';
|
import { offsetToRowColumn } from '../../../utils';
|
||||||
|
|
||||||
import './execution-submit-dialog.scss';
|
import './execution-submit-dialog.scss';
|
||||||
|
@ -39,7 +40,7 @@ export const ExecutionSubmitDialog = React.memo(function ExecutionSubmitDialog(
|
||||||
const [archive, setArchive] = useState('');
|
const [archive, setArchive] = useState('');
|
||||||
|
|
||||||
function handleSubmit(): void {
|
function handleSubmit(): void {
|
||||||
let parsed: any;
|
let parsed: QueryDetailArchive;
|
||||||
try {
|
try {
|
||||||
parsed = JSONBig.parse(archive);
|
parsed = JSONBig.parse(archive);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -55,13 +56,13 @@ export const ExecutionSubmitDialog = React.memo(function ExecutionSubmitDialog(
|
||||||
}
|
}
|
||||||
|
|
||||||
let execution: Execution | undefined;
|
let execution: Execution | undefined;
|
||||||
const detailArchiveVersion = parsed.detailArchiveVersion ?? parsed.profileVersion;
|
const detailArchiveVersion = parsed.detailArchiveVersion ?? (parsed as any).profileVersion;
|
||||||
if (typeof detailArchiveVersion === 'number') {
|
if (typeof detailArchiveVersion === 'number') {
|
||||||
try {
|
try {
|
||||||
if (detailArchiveVersion === 2) {
|
if (detailArchiveVersion === 2) {
|
||||||
execution = Execution.fromTaskReport(parsed.reports).updateWithTaskPayload(
|
execution = Execution.fromTaskReport(parsed.reports)
|
||||||
parsed.payload,
|
.updateWithTaskPayload(parsed.payload)
|
||||||
);
|
.updateWithAsyncStatus(parsed.statementsStatus);
|
||||||
} else {
|
} else {
|
||||||
AppToaster.show({
|
AppToaster.show({
|
||||||
intent: Intent.DANGER,
|
intent: Intent.DANGER,
|
||||||
|
@ -76,9 +77,9 @@ export const ExecutionSubmitDialog = React.memo(function ExecutionSubmitDialog(
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (typeof parsed.multiStageQuery === 'object') {
|
} else if (typeof (parsed as any).multiStageQuery === 'object') {
|
||||||
try {
|
try {
|
||||||
execution = Execution.fromTaskReport(parsed);
|
execution = Execution.fromTaskReport(parsed as any);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
AppToaster.show({
|
AppToaster.show({
|
||||||
intent: Intent.DANGER,
|
intent: Intent.DANGER,
|
||||||
|
|
|
@ -20,10 +20,11 @@ import { Button, ButtonGroup, Menu, MenuDivider, MenuItem, Position } from '@blu
|
||||||
import { IconNames } from '@blueprintjs/icons';
|
import { IconNames } from '@blueprintjs/icons';
|
||||||
import { Popover2 } from '@blueprintjs/popover2';
|
import { Popover2 } from '@blueprintjs/popover2';
|
||||||
import type { JSX } from 'react';
|
import type { JSX } from 'react';
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import type { Execution } from '../../../druid-models';
|
import type { Execution } from '../../../druid-models';
|
||||||
import { downloadQueryResults, formatDurationHybrid, pluralIfNeeded } from '../../../utils';
|
import { downloadQueryResults, formatDurationHybrid, pluralIfNeeded } from '../../../utils';
|
||||||
|
import { DestinationPagesDialog } from '../destination-pages-dialog/destination-pages-dialog';
|
||||||
|
|
||||||
import './execution-summary-panel.scss';
|
import './execution-summary-panel.scss';
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ export const ExecutionSummaryPanel = React.memo(function ExecutionSummaryPanel(
|
||||||
props: ExecutionSummaryPanelProps,
|
props: ExecutionSummaryPanelProps,
|
||||||
) {
|
) {
|
||||||
const { execution, onExecutionDetail, onReset } = props;
|
const { execution, onExecutionDetail, onReset } = props;
|
||||||
|
const [showDestinationPages, setShowDestinationPages] = useState(false);
|
||||||
const queryResult = execution?.result;
|
const queryResult = execution?.result;
|
||||||
|
|
||||||
const buttons: JSX.Element[] = [];
|
const buttons: JSX.Element[] = [];
|
||||||
|
@ -71,21 +73,30 @@ export const ExecutionSummaryPanel = React.memo(function ExecutionSummaryPanel(
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>,
|
/>,
|
||||||
<Popover2
|
execution?.destination?.type === 'durableStorage' && execution.destinationPages ? (
|
||||||
key="download"
|
<Button
|
||||||
className="download-button"
|
key="download"
|
||||||
content={
|
icon={IconNames.DOWNLOAD}
|
||||||
<Menu>
|
minimal
|
||||||
<MenuDivider title="Download results as..." />
|
onClick={() => setShowDestinationPages(true)}
|
||||||
<MenuItem text="CSV" onClick={() => handleDownload('csv')} />
|
/>
|
||||||
<MenuItem text="TSV" onClick={() => handleDownload('tsv')} />
|
) : (
|
||||||
<MenuItem text="JSON (new line delimited)" onClick={() => handleDownload('json')} />
|
<Popover2
|
||||||
</Menu>
|
key="download"
|
||||||
}
|
className="download-button"
|
||||||
position={Position.BOTTOM_RIGHT}
|
content={
|
||||||
>
|
<Menu>
|
||||||
<Button icon={IconNames.DOWNLOAD} minimal />
|
<MenuDivider title="Download results as..." />
|
||||||
</Popover2>,
|
<MenuItem text="CSV" onClick={() => handleDownload('csv')} />
|
||||||
|
<MenuItem text="TSV" onClick={() => handleDownload('tsv')} />
|
||||||
|
<MenuItem text="JSON (new line delimited)" onClick={() => handleDownload('json')} />
|
||||||
|
</Menu>
|
||||||
|
}
|
||||||
|
position={Position.BOTTOM_RIGHT}
|
||||||
|
>
|
||||||
|
<Button icon={IconNames.DOWNLOAD} minimal />
|
||||||
|
</Popover2>
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +107,12 @@ export const ExecutionSummaryPanel = React.memo(function ExecutionSummaryPanel(
|
||||||
return (
|
return (
|
||||||
<ButtonGroup className="execution-summary-panel" minimal>
|
<ButtonGroup className="execution-summary-panel" minimal>
|
||||||
{buttons}
|
{buttons}
|
||||||
|
{showDestinationPages && execution && (
|
||||||
|
<DestinationPagesDialog
|
||||||
|
execution={execution}
|
||||||
|
onClose={() => setShowDestinationPages(false)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -40,7 +40,7 @@ export const IngestSuccessPane = React.memo(function IngestSuccessPane(
|
||||||
const datasource = execution.getIngestDatasource();
|
const datasource = execution.getIngestDatasource();
|
||||||
if (!datasource) return null;
|
if (!datasource) return null;
|
||||||
const table = T(datasource);
|
const table = T(datasource);
|
||||||
const rows = execution.getIngestNumRows();
|
const rows = execution.getOutputNumTotalRows();
|
||||||
|
|
||||||
const warnings = execution.stages?.getWarningCount() || 0;
|
const warnings = execution.stages?.getWarningCount() || 0;
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,7 @@ LIMIT 100`,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{w.datasource === Execution.INLINE_DATASOURCE_MARKER
|
{w.datasource === Execution.INLINE_DATASOURCE_MARKER
|
||||||
? 'data in report'
|
? 'select query'
|
||||||
: w.datasource}
|
: w.datasource}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue