You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@nemo.apache.org by GitBox <gi...@apache.org> on 2021/08/17 05:57:02 UTC

[GitHub] [incubator-nemo] Lemarais commented on a change in pull request #317: [NEMO-483] Record Metrics associated with stream processing

Lemarais commented on a change in pull request #317:
URL: https://github.com/apache/incubator-nemo/pull/317#discussion_r690056935



##########
File path: common/src/main/java/org/apache/nemo/common/punctuation/Latencymark.java
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package org.apache.nemo.common.punctuation;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * Latency mark is conveyor that has data for debugging.
+ * It is created only from source vertex and record the timestamp when it is created and taskId where it is created.

Review comment:
       I considered it is possible that there are multiple stage that has source vertex. So I added createdTaskId field.
   latencymark does not record only latency between source to sink. It record latency between every task in the path. So I added lastTaskId field to track path.

##########
File path: common/src/main/java/org/apache/nemo/common/punctuation/Latencymark.java
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package org.apache.nemo.common.punctuation;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * Latency mark is conveyor that has data for debugging.
+ * It is created only from source vertex and record the timestamp when it is created and taskId where it is created.
+ */
+public final class Latencymark implements Serializable {
+  private final String createdtaskId;
+  private String lastTaskId;
+  private final long timestamp;
+
+  /**
+   * @param taskId task id where it is created
+   * @param timestamp timestamp when it is created
+   */
+  public Latencymark(final String taskId, final long timestamp) {
+    this.createdtaskId = taskId;
+    this.timestamp = timestamp;
+    this.lastTaskId = "";
+  }
+
+  /**
+   * @return the latencymark timestamp
+   */
+  public long getTimestamp() {
+    return timestamp;
+  }
+
+  /**
+   * @return the task id where it is created
+   */
+  public String getCreatedtaskId() {
+    return createdtaskId;
+  }
+
+
+  /**
+   * @return the task id where it is delivered from. task id of upstream task

Review comment:
       latency mark tracks path from source to sink, So It means where this mark from. In the path from source to sink, It indicates the task id of the previous task. 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@nemo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org