OOZIE-2792 amend to fix regex
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/64a58212 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/64a58212 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/64a58212 Branch: refs/heads/oya Commit: 64a58212f3549f865682c75e45710f11578ae9e7 Parents: ccbf692 Author: Robert Kanter <rkan...@apache.org> Authored: Mon Feb 27 08:05:14 2017 -0800 Committer: Robert Kanter <rkan...@apache.org> Committed: Mon Feb 27 08:05:14 2017 -0800 ---------------------------------------------------------------------- .../main/java/org/apache/oozie/action/hadoop/Hive2Main.java | 2 +- .../java/org/apache/oozie/action/hadoop/TestHive2Main.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/64a58212/sharelib/hive2/src/main/java/org/apache/oozie/action/hadoop/Hive2Main.java ---------------------------------------------------------------------- diff --git a/sharelib/hive2/src/main/java/org/apache/oozie/action/hadoop/Hive2Main.java b/sharelib/hive2/src/main/java/org/apache/oozie/action/hadoop/Hive2Main.java index 8e214fa..a3a07bd 100644 --- a/sharelib/hive2/src/main/java/org/apache/oozie/action/hadoop/Hive2Main.java +++ b/sharelib/hive2/src/main/java/org/apache/oozie/action/hadoop/Hive2Main.java @@ -44,7 +44,7 @@ public class Hive2Main extends LauncherMain { static final Pattern[] HIVE2_JOB_IDS_PATTERNS = { Pattern.compile("Ended Job = (job_\\S*)"), Pattern.compile("Submitted application (application[0-9_]*)"), - Pattern.compile("Running with YARN Application = (application_[0-9]+)") + Pattern.compile("Running with YARN Application = (application[0-9_]*)") }; private static final Set<String> DISALLOWED_BEELINE_OPTIONS = new HashSet<String>(); http://git-wip-us.apache.org/repos/asf/oozie/blob/64a58212/sharelib/hive2/src/test/java/org/apache/oozie/action/hadoop/TestHive2Main.java ---------------------------------------------------------------------- diff --git a/sharelib/hive2/src/test/java/org/apache/oozie/action/hadoop/TestHive2Main.java b/sharelib/hive2/src/test/java/org/apache/oozie/action/hadoop/TestHive2Main.java index b94b7c3..b6ad294 100644 --- a/sharelib/hive2/src/test/java/org/apache/oozie/action/hadoop/TestHive2Main.java +++ b/sharelib/hive2/src/test/java/org/apache/oozie/action/hadoop/TestHive2Main.java @@ -30,13 +30,13 @@ public class TestHive2Main extends XTestCase { List<String> lines = new ArrayList<String>(); lines.add("Ended Job = job_001"); lines.add("Running with YARN Application = application_002"); + lines.add("Running with YARN Application = application_002_2"); lines.add("Submitted application application_003"); + lines.add("Submitted application application_003_2"); // Non-matching ones lines.add("Ended Job = "); lines.add("Ended Job = abc"); lines.add("Running with YARN Application = job_004"); - lines.add("Running with YARN Application = application005"); - lines.add("Running with YARN Application = application_abc"); lines.add("Submitted application job_006"); Set<String> jobIds = new LinkedHashSet<String>(); for (String line : lines) { @@ -46,7 +46,9 @@ public class TestHive2Main extends XTestCase { Set<String> expected = new LinkedHashSet<String>(); expected.add("job_001"); expected.add("job_002"); + expected.add("job_002_2"); expected.add("job_003"); + expected.add("job_003_2"); assertEquals(expected, jobIds); } } \ No newline at end of file