tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject git commit: TEZ-427. Rename InputDataErrorEvent to InputReadErrorEvent and add Javadocs (part of TEZ-398). (sseth)
Date Tue, 10 Sep 2013 21:05:47 GMT
Updated Branches:
  refs/heads/TEZ-398 4baeabc9a -> da0cca381


TEZ-427. Rename InputDataErrorEvent to InputReadErrorEvent and add
Javadocs (part of TEZ-398). (sseth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/da0cca38
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/da0cca38
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/da0cca38

Branch: refs/heads/TEZ-398
Commit: da0cca3817f0ec88261b47e0aaaf28cdc578f8a2
Parents: 4baeabc
Author: Siddharth Seth <sseth@apache.org>
Authored: Tue Sep 10 14:05:22 2013 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Tue Sep 10 14:05:22 2013 -0700

----------------------------------------------------------------------
 .../newapi/events/InputDataErrorEvent.java      | 64 -------------------
 .../engine/newapi/events/InputFailedEvent.java  |  6 ++
 .../newapi/events/InputReadErrorEvent.java      | 65 ++++++++++++++++++++
 .../tez/engine/newapi/impl/EventType.java       |  2 +-
 .../apache/tez/engine/newapi/impl/TezEvent.java | 14 ++---
 .../tez/engine/newapi/impl/TezUmbilical.java    |  2 +-
 6 files changed, 80 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputDataErrorEvent.java
----------------------------------------------------------------------
diff --git a/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputDataErrorEvent.java
b/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputDataErrorEvent.java
deleted file mode 100644
index c5a92b8..0000000
--- a/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputDataErrorEvent.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.tez.engine.newapi.events;
-
-import org.apache.tez.engine.newapi.Event;
-
-/**
- * Event generated by an Input to indicate error when trying to
- * retrieve data.
- */
-public final class InputDataErrorEvent extends Event {
-
-  /**
-   * Diagnostics/trace of the error that occurred on the Input's edge.
-   */
-  private final String diagnostics;
-
-  /**
-   * Index of the physical edge on which the error occurred.
-   */
-  private final int index;
-
-  /**
-   * Version of the data on which the error occurred.
-   */
-  private final int version;
-
-  public InputDataErrorEvent(String diagnostics, int index,
-      int version) {
-    super();
-    this.diagnostics = diagnostics;
-    this.index = index;
-    this.version = version;
-  }
-
-  public String getDiagnostics() {
-    return diagnostics;
-  }
-
-  public int getIndex() {
-    return index;
-  }
-
-  public int getVersion() {
-    return version;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputFailedEvent.java
----------------------------------------------------------------------
diff --git a/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputFailedEvent.java
b/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputFailedEvent.java
index 3162970..ac49250 100644
--- a/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputFailedEvent.java
+++ b/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputFailedEvent.java
@@ -21,6 +21,12 @@ package org.apache.tez.engine.newapi.events;
 import org.apache.hadoop.classification.InterfaceAudience.Private;
 import org.apache.tez.engine.newapi.Event;
 
+/**
+ * Event sent from the AM to an Input to indicate that one of it's sources has
+ * failed - effectively the input is no longer available from the particular
+ * source.
+ * Users are not expected to send this event.
+ */
 public class InputFailedEvent extends Event{
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputReadErrorEvent.java
----------------------------------------------------------------------
diff --git a/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputReadErrorEvent.java
b/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputReadErrorEvent.java
new file mode 100644
index 0000000..f2517eb
--- /dev/null
+++ b/tez-engine-api/src/main/java/org/apache/tez/engine/newapi/events/InputReadErrorEvent.java
@@ -0,0 +1,65 @@
+/**
+ * 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.tez.engine.newapi.events;
+
+import org.apache.tez.engine.newapi.Event;
+
+/**
+ * Event generated by an Input to indicate error when trying to retrieve data.
+ * This is not necessarily a fatal event - it's an indication to the AM to retry
+ * source data generation.
+ */
+public final class InputReadErrorEvent extends Event {
+
+  /**
+   * Diagnostics/trace of the error that occurred on the Input's edge.
+   */
+  private final String diagnostics;
+
+  /**
+   * Index of the physical edge on which the error occurred.
+   */
+  private final int index;
+
+  /**
+   * Version of the data on which the error occurred.
+   */
+  private final int version;
+
+  public InputReadErrorEvent(String diagnostics, int index,
+      int version) {
+    super();
+    this.diagnostics = diagnostics;
+    this.index = index;
+    this.version = version;
+  }
+
+  public String getDiagnostics() {
+    return diagnostics;
+  }
+
+  public int getIndex() {
+    return index;
+  }
+
+  public int getVersion() {
+    return version;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/EventType.java
----------------------------------------------------------------------
diff --git a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/EventType.java b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/EventType.java
index c6f4154..5b71d70 100644
--- a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/EventType.java
+++ b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/EventType.java
@@ -21,7 +21,7 @@ package org.apache.tez.engine.newapi.impl;
 public enum EventType {
   TASK_FAILED_EVENT,
   DATA_MOVEMENT_EVENT,
-  INPUT_DATA_ERROR_EVENT,
+  INPUT_READ_ERROR_EVENT,
   INPUT_FAILED_EVENT,
   INTPUT_INFORMATION_EVENT
 }

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezEvent.java
----------------------------------------------------------------------
diff --git a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezEvent.java b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezEvent.java
index 9eea738..da3e551 100644
--- a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezEvent.java
+++ b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezEvent.java
@@ -29,7 +29,7 @@ import org.apache.tez.engine.api.events.EventProtos.InputDataErrorEventProto;
 import org.apache.tez.engine.api.events.SystemEventProtos.TaskFailedEventProto;
 import org.apache.tez.engine.newapi.Event;
 import org.apache.tez.engine.newapi.events.DataMovementEvent;
-import org.apache.tez.engine.newapi.events.InputDataErrorEvent;
+import org.apache.tez.engine.newapi.events.InputReadErrorEvent;
 import org.apache.tez.engine.newapi.events.TaskFailedEvent;
 
 import com.google.protobuf.ByteString;
@@ -52,8 +52,8 @@ public class TezEvent implements Writable {
     this.setSourceInfo(sourceInfo);
     if (event instanceof DataMovementEvent) {
       eventType = EventType.DATA_MOVEMENT_EVENT;
-    } else if (event instanceof InputDataErrorEvent) {
-      eventType = EventType.INPUT_DATA_ERROR_EVENT;
+    } else if (event instanceof InputReadErrorEvent) {
+      eventType = EventType.INPUT_READ_ERROR_EVENT;
     } else if (event instanceof TaskFailedEvent) {
       eventType = EventType.TASK_FAILED_EVENT;
     } else {
@@ -102,8 +102,8 @@ public class TezEvent implements Writable {
         .setUserPayload(ByteString.copyFrom(dmEvt.getUserPayload()))
         .build().toByteArray();
       break;
-    case INPUT_DATA_ERROR_EVENT:
-      InputDataErrorEvent ideEvt = (InputDataErrorEvent) event;
+    case INPUT_READ_ERROR_EVENT:
+      InputReadErrorEvent ideEvt = (InputReadErrorEvent) event;
       eventBytes = InputDataErrorEventProto.newBuilder()
           .setIndex(ideEvt.getIndex())
           .setDiagnostics(ideEvt.getDiagnostics())
@@ -137,10 +137,10 @@ public class TezEvent implements Writable {
           dmProto.getTargetIndex(),
           dmProto.getUserPayload().toByteArray());
       break;
-    case INPUT_DATA_ERROR_EVENT:
+    case INPUT_READ_ERROR_EVENT:
       InputDataErrorEventProto ideProto =
           InputDataErrorEventProto.parseFrom(eventBytes);
-      event = new InputDataErrorEvent(ideProto.getDiagnostics(),
+      event = new InputReadErrorEvent(ideProto.getDiagnostics(),
           ideProto.getIndex(), ideProto.getVersion());
       break;
     case TASK_FAILED_EVENT:

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/da0cca38/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezUmbilical.java
----------------------------------------------------------------------
diff --git a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezUmbilical.java
b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezUmbilical.java
index aa3f4fc..51daf06 100644
--- a/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezUmbilical.java
+++ b/tez-engine/src/main/java/org/apache/tez/engine/newapi/impl/TezUmbilical.java
@@ -147,7 +147,7 @@ public class TezUmbilical extends AbstractService {
             case TASK_FAILED_EVENT:
               // route to ???
               break;
-            case INPUT_DATA_ERROR_EVENT:
+            case INPUT_READ_ERROR_EVENT:
               // invalid event? ignore?
               break;
             }


Mime
View raw message