tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject tez git commit: TEZ-2904. Pig can't specify task specific command opts (jeagles)
Date Wed, 28 Oct 2015 18:18:48 GMT
Repository: tez
Updated Branches:
  refs/heads/master fede4c771 -> 70096c169


TEZ-2904. Pig can't specify task specific command opts (jeagles)


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

Branch: refs/heads/master
Commit: 70096c1690cb89b041c91fb5829bab6de23f9766
Parents: fede4c7
Author: Jonathan Eagles <jeagles@yahoo-inc.com>
Authored: Wed Oct 28 13:18:02 2015 -0500
Committer: Jonathan Eagles <jeagles@yahoo-inc.com>
Committed: Wed Oct 28 13:18:15 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                  | 2 ++
 .../apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java    | 8 ++++----
 .../tez/dag/utils/TestTaskSpecificLaunchCmdOption.java       | 7 +++++++
 3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/70096c16/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 02df677..4f58119 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.8.2: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2904. Pig can't specify task specific command opts
   TEZ-2888. Make critical path calculation resilient to AM crash
   TEZ-2899. Tez UI: DAG getting created with huge horizontal gap in between vertices
   TEZ-2907. NPE in IFile.Reader.getLength during final merge operation
@@ -223,6 +224,7 @@ Release 0.7.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES
+  TEZ-2904. Pig can't specify task specific command opts
   TEZ-2899. Tez UI: DAG getting created with huge horizontal gap in between vertices
   TEZ-2882. Consider improving fetch failure handling
   TEZ-2907. NPE in IFile.Reader.getLength during final merge operation

http://git-wip-us.apache.org/repos/asf/tez/blob/70096c16/tez-dag/src/main/java/org/apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java
b/tez-dag/src/main/java/org/apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java
index 1ec276d..7d93481 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/utils/TaskSpecificLaunchCmdOption.java
@@ -40,17 +40,17 @@ import com.google.common.base.Strings;
 public class TaskSpecificLaunchCmdOption {
   private static final Logger LOG = LoggerFactory.getLogger(TaskSpecificLaunchCmdOption.class);
 
-  //To check any characters apart from "a-zA-Z_0-9 : ; , [] space" anywhere in input.
+  //To check any characters apart from "a-zA-Z_0-9 : ; , [] - space" anywhere in input.
   final static Pattern INVALID_TASK_NAME_REGEX = Pattern
-    .compile("[^(\\w\\s;:,\\[\\])]");
+    .compile("[^(\\w\\s;:,\\[\\]\\-)]");
 
   /**
-   * Regex to validate the task ranges. Vertex name can only have [a-zA-Z_0-9] and
+   * Regex to validate the task ranges. Vertex name can only have [a-zA-Z_0-9], -, and
    * space. Task id is expected to be a number. : is used for specifying task id range. ,
is used
    * as task id separator.
    */
   final static Pattern TASKS_REGEX = Pattern
-    .compile("([\\w\\s]+)\\[([\\d:,\\s]*)\\];?");
+    .compile("([\\w\\s\\-]+)\\[([\\d:,\\s]*)\\];?");
 
   //Range regex where ':' should always be prepended and appended with digit.
   final static Pattern RANGE_REGEX = Pattern.compile("(\\d+):(\\d+)");

http://git-wip-us.apache.org/repos/asf/tez/blob/70096c16/tez-dag/src/test/java/org/apache/tez/dag/utils/TestTaskSpecificLaunchCmdOption.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/utils/TestTaskSpecificLaunchCmdOption.java
b/tez-dag/src/test/java/org/apache/tez/dag/utils/TestTaskSpecificLaunchCmdOption.java
index f22eed6..5685a97 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/utils/TestTaskSpecificLaunchCmdOption.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/utils/TestTaskSpecificLaunchCmdOption.java
@@ -49,6 +49,13 @@ public class TestTaskSpecificLaunchCmdOption {
     TaskSpecificLaunchCmdOption option = getOptions(conf, "");
     assertFalse(option.addTaskSpecificLaunchCmdOption("v", 0));
 
+    option = getOptions(conf, "v-10[0,1,2]");
+    assertTrue(option.addTaskSpecificLaunchCmdOption("v-10", 0));
+    assertTrue(option.addTaskSpecificLaunchCmdOption("v-10", 1));
+    assertTrue(option.addTaskSpecificLaunchCmdOption("v-10", 2));
+    assertFalse(option.addTaskSpecificLaunchCmdOption("v-10",
+        rnd.nextInt(Integer.MAX_VALUE)));
+
     option = getOptions(conf, "v[0,1,2]");
     assertTrue(option.addTaskSpecificLaunchCmdOption("v", 0));
     assertTrue(option.addTaskSpecificLaunchCmdOption("v", 1));


Mime
View raw message