wonook commented on a change in pull request #289: NEMO-433: Improvement of
Task Metrics and Collecting Them For Sampling
URL: https://github.com/apache/incubator-nemo/pull/289#discussion_r387617809
##########
File path:
runtime/common/src/main/java/org/apache/nemo/runtime/common/metric/TaskMetric.java
##########
@@ -78,53 +184,90 @@ private void setTaskDeserializationTime(final long
taskDeserializationTime) {
this.taskDeserializationTime = taskDeserializationTime;
}
- public final long getWrittenBytes() {
- return writtenBytes;
+ /**
+ * Method related to bounded source read time.
+ */
+ public final long getBoundedSourceReadTime() {
+ return boundedSourceReadTime;
}
- private void setWrittenBytes(final long writtenBytes) {
- this.writtenBytes = writtenBytes;
+ private void setBoundedSourceReadTime(final long boundedSourceReadTime) {
+ this.boundedSourceReadTime = boundedSourceReadTime;
}
- public final int getScheduleAttempt() {
- return scheduleAttempt;
+ /**
+ * Method related to peak execution memory.
+ */
+ public final long getPeakExecutionMemory() {
+ return this.peakExecutionMemory;
}
- private void setScheduleAttempt(final int scheduleAttempt) {
- this.scheduleAttempt = scheduleAttempt;
+ private void setPeakExecutionMemory(final long peakExecutionMemory) {
+ this.peakExecutionMemory = peakExecutionMemory;
}
- public final String getContainerId() {
- return containerId;
+ /**
+ * Method related to task size ratio.
+ */
+ public final int getTaskSizeRatio() {
+ return this.taskSizeRatio;
}
- private void setContainerId(final String containerId) {
- this.containerId = containerId;
+ private void setTaskSizeRatio(final int taskSizeRatio) {
+ this.taskSizeRatio = taskSizeRatio;
}
- @Override
- public final List<StateTransitionEvent<TaskState.State>>
getStateTransitionEvents() {
- return stateTransitionEvents;
+ /**
+ * Method related to shuffle.
+ */
+ public final long getShuffleReadBytes() {
+ return this.shuffleReadBytes;
}
- @Override
- public final String getId() {
- return id;
+ private void setShuffleReadBytes(final long shuffleReadBytes) {
+ this.shuffleReadBytes = shuffleReadBytes;
}
- @Override
- public final void addEvent(final TaskState.State prevState, final
TaskState.State newState) {
- stateTransitionEvents.add(new
StateTransitionEvent<>(System.currentTimeMillis(), prevState, newState));
+ public final long getShuffleReadTime() {
+ return this.shuffleReadTime;
}
- private void addEvent(final StateTransitionEvent<TaskState.State> event) {
- stateTransitionEvents.add(event);
+ private void setShuffleReadTime(final long shuffleReadTime) {
+ this.shuffleReadTime = shuffleReadTime;
+ }
+
+ public final long getShuffleWriteBytes() {
+ return this.shuffleWriteBytes;
+ }
+
+ private void setShuffleWriteBytes(final long shuffleWriteBytes) {
+ this.shuffleWriteBytes = shuffleWriteBytes;
+ }
+
+ public final long getShuffleWriteTime() {
+ return this.shuffleWriteTime;
+ }
+
+ private void setShuffleWriteTime(final long shuffleWriteTime) {
+ this.shuffleWriteTime = shuffleWriteTime;
+ }
+
+ @Override
+ public final String getId() {
+ return id;
}
@Override
public final boolean processMetricMessage(final String metricField, final
byte[] metricValue) {
LOG.debug("metric {} has just arrived!", metricField);
switch (metricField) {
+ case "taskDuration":
+ setTaskDuration(SerializationUtils.deserialize(metricValue));
+ break;
+ case "schedulingOverhead":
+ setSchedulingOverhead(SerializationUtils.deserialize(metricValue));
+ setSchedulingOverhead(SerializationUtils.deserialize(metricValue));
Review comment:
unnecessary repetition!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services