-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add peak memory distribution among tasks of each stage #13379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ public class TaskStats | |
| private final DataSize userMemoryReservation; | ||
| private final DataSize revocableMemoryReservation; | ||
| private final DataSize systemMemoryReservation; | ||
| private final long peakTotalMemoryInBytes; | ||
|
|
||
| private final Duration totalScheduledTime; | ||
| private final Duration totalCpuTime; | ||
|
|
@@ -98,6 +99,7 @@ public TaskStats(DateTime createTime, DateTime endTime) | |
| new DataSize(0, BYTE), | ||
| new DataSize(0, BYTE), | ||
| new DataSize(0, BYTE), | ||
| 0, | ||
| new Duration(0, MILLISECONDS), | ||
| new Duration(0, MILLISECONDS), | ||
| new Duration(0, MILLISECONDS), | ||
|
|
@@ -137,6 +139,7 @@ public TaskStats( | |
| @JsonProperty("userMemoryReservation") DataSize userMemoryReservation, | ||
| @JsonProperty("revocableMemoryReservation") DataSize revocableMemoryReservation, | ||
| @JsonProperty("systemMemoryReservation") DataSize systemMemoryReservation, | ||
| @JsonProperty("peakTotalMemoryInBytes") long peakTotalMemoryInBytes, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at cumulativeUserMemory, I'd expect
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or |
||
|
|
||
| @JsonProperty("totalScheduledTime") Duration totalScheduledTime, | ||
| @JsonProperty("totalCpuTime") Duration totalCpuTime, | ||
|
|
@@ -190,6 +193,7 @@ public TaskStats( | |
| this.userMemoryReservation = requireNonNull(userMemoryReservation, "userMemoryReservation is null"); | ||
| this.revocableMemoryReservation = requireNonNull(revocableMemoryReservation, "revocableMemoryReservation is null"); | ||
| this.systemMemoryReservation = requireNonNull(systemMemoryReservation, "systemMemoryReservation is null"); | ||
| this.peakTotalMemoryInBytes = peakTotalMemoryInBytes; | ||
|
|
||
| this.totalScheduledTime = requireNonNull(totalScheduledTime, "totalScheduledTime is null"); | ||
| this.totalCpuTime = requireNonNull(totalCpuTime, "totalCpuTime is null"); | ||
|
|
@@ -318,6 +322,12 @@ public DataSize getSystemMemoryReservation() | |
| return systemMemoryReservation; | ||
| } | ||
|
|
||
| @JsonProperty | ||
| public long getPeakTotalMemoryInBytes() | ||
| { | ||
| return peakTotalMemoryInBytes; | ||
| } | ||
|
|
||
| @JsonProperty | ||
| public Duration getTotalScheduledTime() | ||
| { | ||
|
|
@@ -441,6 +451,7 @@ public TaskStats summarize() | |
| userMemoryReservation, | ||
| revocableMemoryReservation, | ||
| systemMemoryReservation, | ||
| peakTotalMemoryInBytes, | ||
| totalScheduledTime, | ||
| totalCpuTime, | ||
| totalBlockedTime, | ||
|
|
@@ -479,6 +490,7 @@ public TaskStats summarizeFinal() | |
| userMemoryReservation, | ||
| revocableMemoryReservation, | ||
| systemMemoryReservation, | ||
| peakTotalMemoryInBytes, | ||
| totalScheduledTime, | ||
| totalCpuTime, | ||
| totalBlockedTime, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,8 @@ public class QueryStatistics | |
| private final int completedSplits; | ||
| private final boolean complete; | ||
|
|
||
| private final List<StageCpuDistribution> cpuTimeDistribution; | ||
| private final List<ResourceDistribution> cpuTimeDistribution; | ||
| private final List<ResourceDistribution> peakMemoryDistribution; | ||
|
|
||
| private final List<String> operatorSummaries; | ||
|
|
||
|
|
@@ -72,7 +73,8 @@ public QueryStatistics( | |
| List<StageGcStatistics> stageGcStatistics, | ||
| int completedSplits, | ||
| boolean complete, | ||
| List<StageCpuDistribution> cpuTimeDistribution, | ||
| List<ResourceDistribution> cpuTimeDistribution, | ||
| List<ResourceDistribution> peakMemoryDistribution, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about |
||
| List<String> operatorSummaries) | ||
| { | ||
| this.cpuTime = requireNonNull(cpuTime, "cpuTime is null"); | ||
|
|
@@ -96,6 +98,7 @@ public QueryStatistics( | |
| this.completedSplits = completedSplits; | ||
| this.complete = complete; | ||
| this.cpuTimeDistribution = requireNonNull(cpuTimeDistribution, "cpuTimeDistribution is null"); | ||
| this.peakMemoryDistribution = requireNonNull(peakMemoryDistribution, "peakMemoryDistribution is null"); | ||
| this.operatorSummaries = requireNonNull(operatorSummaries, "operatorSummaries is null"); | ||
| } | ||
|
|
||
|
|
@@ -199,11 +202,16 @@ public boolean isComplete() | |
| return complete; | ||
| } | ||
|
|
||
| public List<StageCpuDistribution> getCpuTimeDistribution() | ||
| public List<ResourceDistribution> getCpuTimeDistribution() | ||
| { | ||
| return cpuTimeDistribution; | ||
| } | ||
|
|
||
| public List<ResourceDistribution> getPeakMemoryDistribution() | ||
| { | ||
| return peakMemoryDistribution; | ||
| } | ||
|
|
||
| public List<String> getOperatorSummaries() | ||
| { | ||
| return operatorSummaries; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viczhang861 Vic, thanks for explaining. It makes sense now.