diff --git a/presto-ui/src/components/QueryDetail.jsx b/presto-ui/src/components/QueryDetail.jsx index bdb5a5c032b80..36687ba82286b 100644 --- a/presto-ui/src/components/QueryDetail.jsx +++ b/presto-ui/src/components/QueryDetail.jsx @@ -109,7 +109,7 @@ function TaskList({tasks}) { function calculateElapsedTime(row) { let elapsedTime = parseDuration(row.stats.elapsedTimeInNanos + "ns"); if (elapsedTime === 0) { - elapsedTime = Date.now() - Date.parse(row.stats.createTime); + elapsedTime = Date.now() - row.stats.createTimeInMillis; } return elapsedTime; } diff --git a/presto-ui/src/components/QueryOverview.jsx b/presto-ui/src/components/QueryOverview.jsx index e649a704f016f..5a4c6b6d5786d 100644 --- a/presto-ui/src/components/QueryOverview.jsx +++ b/presto-ui/src/components/QueryOverview.jsx @@ -49,7 +49,7 @@ type TaskStatus = { } type TaskStats = { - createTime: string; + createTimeInMillis: number; elapsedTimeInNanos: number; totalCpuTimeInNanos: number; fullyBlocked: boolean; @@ -285,7 +285,7 @@ function TaskList({ tasks }: { tasks: Task[] }) : React.Node { function calculateElapsedTime(row: Task): number { let elapsedTime = parseDuration(row.stats.elapsedTimeInNanos + "ns") || 0; if (elapsedTime === 0) { - elapsedTime = Date.now() - Date.parse(row.stats.createTime); + elapsedTime = Date.now() - row.stats.createTimeInMillis; } return elapsedTime; } diff --git a/presto-ui/src/components/QuerySplitsView.jsx b/presto-ui/src/components/QuerySplitsView.jsx index 2181fd69f330c..8d850a4725f06 100644 --- a/presto-ui/src/components/QuerySplitsView.jsx +++ b/presto-ui/src/components/QuerySplitsView.jsx @@ -32,11 +32,11 @@ export default function SplitView({ data, show }): void { return { taskId: task.taskId.substring(task.taskId.indexOf('.') + 1), time: { - create: task.stats.createTime, - firstStart: task.stats.firstStartTime, - lastStart: task.stats.lastStartTime, - lastEnd: task.stats.lastEndTime, - end: task.stats.endTime, + create: task.stats.createTimeInMillis, + firstStart: task.stats.firstStartTimeInMillis, + lastStart: task.stats.lastStartTimeInMillis, + lastEnd: task.stats.lastEndTimeInMillis, + end: task.stats.endTimeInMillis, }, }; }); diff --git a/presto-ui/src/components/QueryStageView.jsx b/presto-ui/src/components/QueryStageView.jsx index bf2949e8f4664..f1176baa15822 100644 --- a/presto-ui/src/components/QueryStageView.jsx +++ b/presto-ui/src/components/QueryStageView.jsx @@ -187,9 +187,9 @@ function OperatorDetail({ index, operator, tasks }) { tasksSorted.forEach(task => { task.stats.pipelines.forEach(pipeline => { if (pipeline.pipelineId === operator.pipelineId) { - pipeline.operatorSummaries.forEach(operator => { - if (operator.operatorId === operator.operatorId) { - operatorTasks.push(operator); + pipeline.operatorSummaries.forEach(op => { + if (op.operatorId === operator.operatorId) { + operatorTasks.push(op); } }); } diff --git a/presto-ui/src/components/Splits.jsx b/presto-ui/src/components/Splits.jsx index 3e6b943251cb9..d8cca85914a3b 100644 --- a/presto-ui/src/components/Splits.jsx +++ b/presto-ui/src/components/Splits.jsx @@ -36,11 +36,11 @@ export default function Split(): void { return { taskId: task.taskId.substring(task.taskId.indexOf('.') + 1), time: { - create: task.stats.createTime, - firstStart: task.stats.firstStartTime, - lastStart: task.stats.lastStartTime, - lastEnd: task.stats.lastEndTime, - end: task.stats.endTime, + create: task.stats.createTimeInMillis, + firstStart: task.stats.firstStartTimeInMillis, + lastStart: task.stats.lastStartTimeInMillis, + lastEnd: task.stats.lastEndTimeInMillis, + end: task.stats.endTimeInMillis, }, }; }); diff --git a/presto-ui/src/components/StageDetail.jsx b/presto-ui/src/components/StageDetail.jsx index d0d8619be1dc9..d47c2f117976c 100644 --- a/presto-ui/src/components/StageDetail.jsx +++ b/presto-ui/src/components/StageDetail.jsx @@ -189,9 +189,9 @@ function OperatorDetail({ index, operator, tasks }) { tasksSorted.forEach(task => { task.stats.pipelines.forEach(pipeline => { if (pipeline.pipelineId === operator.pipelineId) { - pipeline.operatorSummaries.forEach(operator => { - if (operator.operatorId === operator.operatorId) { - operatorTasks.push(operator); + pipeline.operatorSummaries.forEach(op => { + if (op.operatorId === operator.operatorId) { + operatorTasks.push(op); } }); }