mirror of https://github.com/apache/druid.git
* fix porgress indication for table input * fix snapshot Co-authored-by: Vadim Ogievetsky <vadim@ogievetsky.com>
This commit is contained in:
parent
c5d0fcde50
commit
b1802c4ff3
|
@ -32,7 +32,7 @@ describe('aggregateSortProgressCounters', () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'sortProgress',
|
type: 'sortProgress',
|
||||||
totalMergingLevels: 4,
|
totalMergingLevels: -1,
|
||||||
levelToTotalBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
|
levelToTotalBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
|
||||||
levelToMergedBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
|
levelToMergedBatches: { 0: 2, 1: 4, 2: 6, 3: 5 },
|
||||||
totalMergersForUltimateLevel: 1,
|
totalMergersForUltimateLevel: 1,
|
||||||
|
@ -41,7 +41,6 @@ describe('aggregateSortProgressCounters', () => {
|
||||||
).toEqual({
|
).toEqual({
|
||||||
totalMergingLevels: {
|
totalMergingLevels: {
|
||||||
'2': 1,
|
'2': 1,
|
||||||
'4': 1,
|
|
||||||
},
|
},
|
||||||
levelToBatches: {
|
levelToBatches: {
|
||||||
'0': {
|
'0': {
|
||||||
|
|
|
@ -200,7 +200,10 @@ export function aggregateSortProgressCounters(
|
||||||
sortProgressCounters: SortProgressCounter[],
|
sortProgressCounters: SortProgressCounter[],
|
||||||
): AggregatedSortProgress {
|
): AggregatedSortProgress {
|
||||||
return {
|
return {
|
||||||
totalMergingLevels: countBy(sortProgressCounters, c => c.totalMergingLevels),
|
totalMergingLevels: countBy(
|
||||||
|
sortProgressCounters.filter(c => c.totalMergingLevels >= 0),
|
||||||
|
c => c.totalMergingLevels,
|
||||||
|
),
|
||||||
levelToBatches: groupByAsMap(
|
levelToBatches: groupByAsMap(
|
||||||
sortProgressCounters.flatMap(c =>
|
sortProgressCounters.flatMap(c =>
|
||||||
Object.entries(c.levelToMergedBatches).map(([level, merged]) => [
|
Object.entries(c.levelToMergedBatches).map(([level, merged]) => [
|
||||||
|
@ -430,9 +433,8 @@ export class Stages {
|
||||||
if (inputFileCount) {
|
if (inputFileCount) {
|
||||||
// If we know how many files there are base the progress on how many files were read
|
// If we know how many files there are base the progress on how many files were read
|
||||||
return (
|
return (
|
||||||
sum(input, (input, i) =>
|
sum(input, (_, i) => this.getTotalCounterForStage(stage, `input${i}`, 'files')) /
|
||||||
input.type === 'external' ? this.getTotalCounterForStage(stage, `input${i}`, 'files') : 0,
|
inputFileCount
|
||||||
) / inputFileCount
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, base it on the stage input divided by the output of all non-broadcast input stages,
|
// Otherwise, base it on the stage input divided by the output of all non-broadcast input stages,
|
||||||
|
|
|
@ -31,6 +31,11 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rt-th.wrapped,
|
||||||
|
.rt-td.wrapped {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.padded-header .rt-thead .rt-th {
|
&.padded-header .rt-thead .rt-th {
|
||||||
|
|
|
@ -134,7 +134,7 @@ export const CurrentDartPanel = React.memo(function CurrentViberPanel(
|
||||||
const anonymous = w.identity === 'allowAll' && w.authenticator === 'allowAll';
|
const anonymous = w.identity === 'allowAll' && w.authenticator === 'allowAll';
|
||||||
return (
|
return (
|
||||||
<Popover className="work-entry" key={w.sqlQueryId} position="left" content={menu}>
|
<Popover className="work-entry" key={w.sqlQueryId} position="left" content={menu}>
|
||||||
<div>
|
<div onDoubleClick={() => setShowSql(w.sql)}>
|
||||||
<div className="line1">
|
<div className="line1">
|
||||||
<Icon
|
<Icon
|
||||||
className={'status-icon ' + w.state.toLowerCase()}
|
className={'status-icon ' + w.state.toLowerCase()}
|
||||||
|
|
|
@ -80,7 +80,7 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
"accessor": "stageNumber",
|
"accessor": "stageNumber",
|
||||||
"className": "padded",
|
"className": "padded",
|
||||||
"id": "stage",
|
"id": "stage",
|
||||||
"width": 140,
|
"width": 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Cell": [Function],
|
"Cell": [Function],
|
||||||
|
@ -102,7 +102,7 @@ exports[`ExecutionStagesPane matches snapshot 1`] = `
|
||||||
"accessor": [Function],
|
"accessor": [Function],
|
||||||
"className": "padded",
|
"className": "padded",
|
||||||
"id": "rows_processed",
|
"id": "rows_processed",
|
||||||
"width": 160,
|
"width": 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Cell": [Function],
|
"Cell": [Function],
|
||||||
|
|
|
@ -125,6 +125,13 @@
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
background: $dark-gray3;
|
background: $dark-gray3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-counters-for-sort {
|
||||||
|
.count {
|
||||||
|
font-style: italic;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpu-label {
|
.cpu-label {
|
||||||
|
|
|
@ -245,7 +245,7 @@ export const ExecutionStagesPane = React.memo(function ExecutionStagesPane(
|
||||||
Header: 'Worker',
|
Header: 'Worker',
|
||||||
id: 'worker',
|
id: 'worker',
|
||||||
accessor: d => d.index,
|
accessor: d => d.index,
|
||||||
width: 100,
|
width: 95,
|
||||||
Cell({ value }) {
|
Cell({ value }) {
|
||||||
const taskId = `${execution.id}-worker${value}_0`;
|
const taskId = `${execution.id}-worker${value}_0`;
|
||||||
return (
|
return (
|
||||||
|
@ -270,7 +270,8 @@ export const ExecutionStagesPane = React.memo(function ExecutionStagesPane(
|
||||||
id: 'cpu',
|
id: 'cpu',
|
||||||
accessor: d => d.cpu?.main?.cpu || 0,
|
accessor: d => d.cpu?.main?.cpu || 0,
|
||||||
className: 'padded',
|
className: 'padded',
|
||||||
width: 220,
|
width: 240,
|
||||||
|
show: stages.hasCounterForStage(stage, 'cpu'),
|
||||||
Cell({ original }) {
|
Cell({ original }) {
|
||||||
const cpuTotals = original.cpu || {};
|
const cpuTotals = original.cpu || {};
|
||||||
return (
|
return (
|
||||||
|
@ -310,7 +311,7 @@ export const ExecutionStagesPane = React.memo(function ExecutionStagesPane(
|
||||||
id: counterName,
|
id: counterName,
|
||||||
accessor: d => d[counterName]!.rows,
|
accessor: d => d[counterName]!.rows,
|
||||||
className: 'padded',
|
className: 'padded',
|
||||||
width: 160,
|
width: 200,
|
||||||
Cell({ value, original }) {
|
Cell({ value, original }) {
|
||||||
const c = (original as SimpleWideCounter)[counterName]!;
|
const c = (original as SimpleWideCounter)[counterName]!;
|
||||||
return (
|
return (
|
||||||
|
@ -397,12 +398,27 @@ export const ExecutionStagesPane = React.memo(function ExecutionStagesPane(
|
||||||
{
|
{
|
||||||
Header: `Counts`,
|
Header: `Counts`,
|
||||||
accessor: 'counts',
|
accessor: 'counts',
|
||||||
className: 'padded',
|
className: 'padded wrapped',
|
||||||
width: 180,
|
width: 300,
|
||||||
Cell({ value }) {
|
Cell({ value }) {
|
||||||
return Object.entries(value)
|
const entries = Object.entries(value);
|
||||||
.map(([n, v]) => (Number(v) > 1 ? `${n} (${v})` : n))
|
if (!entries.length) return '-';
|
||||||
.join(', ');
|
return (
|
||||||
|
<>
|
||||||
|
{entries.map(([n, v], i) => (
|
||||||
|
<>
|
||||||
|
<span
|
||||||
|
key={n}
|
||||||
|
data-tooltip={`${pluralIfNeeded(Number(v), 'worker')} reporting: ${n}`}
|
||||||
|
>
|
||||||
|
{n}
|
||||||
|
{Number(v) > 1 && <span className="count">{` (${v})`}</span>}
|
||||||
|
</span>
|
||||||
|
{i < entries.length - 1 && <span key={`${n}_sep`}>, </span>}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
@ -686,7 +702,7 @@ ${title} uncompressed size: ${formatBytesCompact(
|
||||||
id: 'stage',
|
id: 'stage',
|
||||||
accessor: 'stageNumber',
|
accessor: 'stageNumber',
|
||||||
className: 'padded',
|
className: 'padded',
|
||||||
width: 140,
|
width: 160,
|
||||||
Cell(props) {
|
Cell(props) {
|
||||||
const stage = props.original as StageDefinition;
|
const stage = props.original as StageDefinition;
|
||||||
const myError = error && error.stageNumber === stage.stageNumber;
|
const myError = error && error.stageNumber === stage.stageNumber;
|
||||||
|
@ -770,7 +786,7 @@ ${title} uncompressed size: ${formatBytesCompact(
|
||||||
id: 'rows_processed',
|
id: 'rows_processed',
|
||||||
accessor: () => null,
|
accessor: () => null,
|
||||||
className: 'padded',
|
className: 'padded',
|
||||||
width: 160,
|
width: 200,
|
||||||
Cell({ original }) {
|
Cell({ original }) {
|
||||||
const stage = original as StageDefinition;
|
const stage = original as StageDefinition;
|
||||||
const { input, broadcast } = stage.definition;
|
const { input, broadcast } = stage.definition;
|
||||||
|
|
|
@ -217,7 +217,9 @@ LIMIT 100`,
|
||||||
return (
|
return (
|
||||||
<Popover className="work-entry" key={w.taskId} position="left" content={menu}>
|
<Popover className="work-entry" key={w.taskId} position="left" content={menu}>
|
||||||
<div
|
<div
|
||||||
data-tooltip={w.errorMessage}
|
data-tooltip={
|
||||||
|
`ID: ${w.taskId}` + (w.errorMessage ? `\n\nError:\n${w.errorMessage}` : '')
|
||||||
|
}
|
||||||
onDoubleClick={() => onExecutionDetails(w.taskId)}
|
onDoubleClick={() => onExecutionDetails(w.taskId)}
|
||||||
>
|
>
|
||||||
<div className="line1">
|
<div className="line1">
|
||||||
|
|
Loading…
Reference in New Issue