You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by pb...@apache.org on 2016/12/13 13:19:48 UTC
[17/48] oozie git commit: Fix test failures for OOZIE-2225 (pbacsko
via rohini)
Fix test failures for OOZIE-2225 (pbacsko via rohini)
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/b327fdb5
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/b327fdb5
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/b327fdb5
Branch: refs/heads/oya
Commit: b327fdb5b08cbcc797b2cf25b3e13c3310453a9b
Parents: 3ee71d4
Author: Rohini Palaniswamy <ro...@apache.org>
Authored: Fri Nov 18 12:04:03 2016 -0800
Committer: Rohini Palaniswamy <ro...@apache.org>
Committed: Fri Nov 18 12:04:03 2016 -0800
----------------------------------------------------------------------
.../executor/jpa/WorkflowsJobGetJPAExecutor.java | 1 +
.../apache/oozie/store/StoreStatusFilter.java | 1 +
.../jpa/TestBundleJobInfoGetJPAExecutor.java | 19 +++++++++++++++++++
.../jpa/TestCoordJobInfoGetJPAExecutor.java | 19 +++++++++++++++++++
.../jpa/TestWorkflowsJobGetJPAExecutor.java | 19 +++++++++++++++++++
release-log.txt | 2 +-
6 files changed, 60 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/core/src/main/java/org/apache/oozie/executor/jpa/WorkflowsJobGetJPAExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/executor/jpa/WorkflowsJobGetJPAExecutor.java b/core/src/main/java/org/apache/oozie/executor/jpa/WorkflowsJobGetJPAExecutor.java
index 13af8f8..f50c1a4 100644
--- a/core/src/main/java/org/apache/oozie/executor/jpa/WorkflowsJobGetJPAExecutor.java
+++ b/core/src/main/java/org/apache/oozie/executor/jpa/WorkflowsJobGetJPAExecutor.java
@@ -278,6 +278,7 @@ public class WorkflowsJobGetJPAExecutor implements JPAExecutor<WorkflowsInfo> {
// w.id = text || w.appName.contains(text) || w.user.contains(text)
else if (entry.getKey().equalsIgnoreCase(OozieClient.FILTER_TEXT)) {
StoreStatusFilter.filterJobsUsingText(filter, sb, isEnabled, seletStr, valArray, orArray, colArray);
+ isEnabled = true;
}
}
}
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java b/core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java
index b649ae5..0850b75 100644
--- a/core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java
+++ b/core/src/main/java/org/apache/oozie/store/StoreStatusFilter.java
@@ -325,6 +325,7 @@ public class StoreStatusFilter {
// job.id = text || job.appName.contains(text) || job.user.contains(text)
else if (entry.getKey().equalsIgnoreCase(OozieClient.FILTER_TEXT)) {
filterJobsUsingText(filter, sb, isEnabled, seletStr, valArray, orArray, colArray);
+ isEnabled = true;
}
}
}
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/core/src/test/java/org/apache/oozie/executor/jpa/TestBundleJobInfoGetJPAExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/executor/jpa/TestBundleJobInfoGetJPAExecutor.java b/core/src/test/java/org/apache/oozie/executor/jpa/TestBundleJobInfoGetJPAExecutor.java
index e0851f5..eb0d538 100644
--- a/core/src/test/java/org/apache/oozie/executor/jpa/TestBundleJobInfoGetJPAExecutor.java
+++ b/core/src/test/java/org/apache/oozie/executor/jpa/TestBundleJobInfoGetJPAExecutor.java
@@ -240,6 +240,25 @@ public class TestBundleJobInfoGetJPAExecutor extends XDataTestCase {
assertEquals(ret.getBundleJobs().size(), 1);
}
+ public void testGetJobInfoForTextAndStatus() throws Exception {
+ BundleJobBean bundleJob = addRecordToBundleJobTable(BundleJob.Status.RUNNING, false);
+ bundleJob.setAppName("bundle-job-1");
+ BundleJobQueryExecutor.getInstance().executeUpdate(BundleJobQueryExecutor.BundleJobQuery.UPDATE_BUNDLE_JOB, bundleJob);
+
+ Map<String, List<String>> filter = new HashMap<String, List<String>>();
+ List<String> textFilterList = new ArrayList<String>();
+ textFilterList.add("bundle-job-1");
+ List<String> textStatusList = new ArrayList<String>();
+ textStatusList.add(BundleJob.Status.RUNNING.toString());
+ filter.put(OozieClient.FILTER_TEXT, textFilterList);
+ filter.put(OozieClient.FILTER_STATUS, textStatusList);
+
+ JPAService jpaService = Services.get().get(JPAService.class);
+ BundleJobInfoGetJPAExecutor bundleInfoGetCmd = new BundleJobInfoGetJPAExecutor(filter, 1, 20);
+ BundleJobInfo bundleJobsInfo = jpaService.execute(bundleInfoGetCmd);
+ assertEquals(1, bundleJobsInfo.getBundleJobs().size());
+ }
+
private void _testGetJobInfoForGroup() throws Exception {
JPAService jpaService = Services.get().get(JPAService.class);
assertNotNull(jpaService);
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobInfoGetJPAExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobInfoGetJPAExecutor.java b/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobInfoGetJPAExecutor.java
index a8d4d5b..43334f9 100644
--- a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobInfoGetJPAExecutor.java
+++ b/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobInfoGetJPAExecutor.java
@@ -324,6 +324,25 @@ public class TestCoordJobInfoGetJPAExecutor extends XDataTestCase {
assertEquals(ret.getCoordJobs().size(), 1);
}
+ public void testGetJobInfoForTextAndStatus() throws Exception {
+ CoordinatorJobBean coordinatorJob = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false);
+ coordinatorJob.setAppName("coord-job-1");
+ CoordJobQueryExecutor.getInstance().executeUpdate(CoordJobQueryExecutor.CoordJobQuery.UPDATE_COORD_JOB, coordinatorJob);
+
+ Map<String, List<String>> filter = new HashMap<String, List<String>>();
+ List<String> textFilterList = new ArrayList<String>();
+ textFilterList.add("coord-job-1");
+ List<String> textStatusList = new ArrayList<String>();
+ textStatusList.add(CoordinatorJob.Status.RUNNING.toString());
+ filter.put(OozieClient.FILTER_TEXT, textFilterList);
+ filter.put(OozieClient.FILTER_STATUS, textStatusList);
+
+ JPAService jpaService = Services.get().get(JPAService.class);
+ CoordJobInfoGetJPAExecutor coordInfoGetCmd = new CoordJobInfoGetJPAExecutor(filter, 1, 20);
+ CoordinatorJobInfo coordJobsInfo = jpaService.execute(coordInfoGetCmd);
+ assertEquals(1, coordJobsInfo.getCoordJobs().size());
+ }
+
private void _testGetJobInfoForFrequency() throws Exception {
JPAService jpaService = Services.get().get(JPAService.class);
assertNotNull(jpaService);
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowsJobGetJPAExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowsJobGetJPAExecutor.java b/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowsJobGetJPAExecutor.java
index 398678b..992f566 100644
--- a/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowsJobGetJPAExecutor.java
+++ b/core/src/test/java/org/apache/oozie/executor/jpa/TestWorkflowsJobGetJPAExecutor.java
@@ -221,6 +221,25 @@ public class TestWorkflowsJobGetJPAExecutor extends XDataTestCase {
assertEquals(2, wfInfo.getWorkflows().size());
}
+ public void testGetWFInfoForTextAndStatus() throws Exception {
+ WorkflowJobBean workflowJob = addRecordToWfJobTable(WorkflowJob.Status.PREP, WorkflowInstance.Status.PREP);
+ workflowJob.setAppName("wf-name-1");
+ WorkflowJobQueryExecutor.getInstance().executeUpdate(WorkflowJobQuery.UPDATE_WORKFLOW, workflowJob);
+
+ Map<String, List<String>> filter = new HashMap<String, List<String>>();
+ List<String> textFilterList = new ArrayList<String>();
+ textFilterList.add("wf-name-1");
+ List<String> textStatusList = new ArrayList<String>();
+ textStatusList.add(WorkflowJob.Status.PREP.toString());
+ filter.put(OozieClient.FILTER_TEXT, textFilterList);
+ filter.put(OozieClient.FILTER_STATUS, textStatusList);
+
+ JPAService jpaService = Services.get().get(JPAService.class);
+ WorkflowsJobGetJPAExecutor wfGetCmd = new WorkflowsJobGetJPAExecutor(filter, 1, 20);
+ WorkflowsInfo wfInfo = jpaService.execute(wfGetCmd);
+ assertEquals(1, wfInfo.getWorkflows().size());
+ }
+
public void testWfJobsGetWithCreatedTime() throws Exception {
JPAService jpaService = Services.get().get(JPAService.class);
Date createdTime1 = DateUtils.parseDateUTC("2012-01-01T10:00Z");
http://git-wip-us.apache.org/repos/asf/oozie/blob/b327fdb5/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 5e9b8ff..caceaa9 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -2,7 +2,7 @@
OOZIE-2666 Support embedding Jetty into Oozie (asasvari via rkanter)
OOZIE-1459 Remove the version in the child poms for maven-antrun-plugin (Jan Hentschel via rkanter)
-OOZIE-2225 Add wild card filter for gathering jobs (sai-krish via rkanter)
+OOZIE-2225 Add wild card filter for gathering jobs (sai-krish,pbacsko via rkanter,rohini)
OOZIE-2536 Hadoop's cleanup of local directory in uber mode causing failures (satishsaley via rohini)
OOZIE-1986 Add FindBugs report to pre-commit build (andras.piros via rkanter)
OOZIE-2634 Queue dump command message is confusing when the queue is empty (andras.piros via rkanter)