You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by bz...@apache.org on 2015/05/14 20:11:55 UTC
oozie git commit: OOZIE-2232 Oozie should invalidate bulk write
command when "-filter" is missing (venkatnrangan via bzhang)
Repository: oozie
Updated Branches:
refs/heads/master 39f7ad9c0 -> cb5f37601
OOZIE-2232 Oozie should invalidate bulk write command when "-filter" is missing (venkatnrangan via bzhang)
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/cb5f3760
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/cb5f3760
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/cb5f3760
Branch: refs/heads/master
Commit: cb5f376012857d3f289b2b898975d5dc0fccb1ae
Parents: 39f7ad9
Author: Bowen Zhang <bo...@yahoo.com>
Authored: Thu May 14 11:09:34 2015 -0700
Committer: Bowen Zhang <bo...@yahoo.com>
Committed: Thu May 14 11:10:41 2015 -0700
----------------------------------------------------------------------
.../apache/oozie/servlet/BaseJobsServlet.java | 3 +++
.../org/apache/oozie/client/TestOozieCLI.java | 21 ++++++++++++++++++++
release-log.txt | 1 +
3 files changed, 25 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oozie/blob/cb5f3760/core/src/main/java/org/apache/oozie/servlet/BaseJobsServlet.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/servlet/BaseJobsServlet.java b/core/src/main/java/org/apache/oozie/servlet/BaseJobsServlet.java
index 54b173b..8dfd160 100644
--- a/core/src/main/java/org/apache/oozie/servlet/BaseJobsServlet.java
+++ b/core/src/main/java/org/apache/oozie/servlet/BaseJobsServlet.java
@@ -140,6 +140,9 @@ public abstract class BaseJobsServlet extends JsonRestServlet {
String lenStr = request.getParameter(RestConstants.LEN_PARAM);
String jobType = request.getParameter(RestConstants.JOBTYPE_PARAM);
+ if (filter == null) {
+ throw new IllegalArgumentException("filter params must be specified for bulk write API");
+ }
int start = (startStr != null) ? Integer.parseInt(startStr) : 1;
start = (start < 1) ? 1 : start;
int len = (lenStr != null) ? Integer.parseInt(lenStr) : 50;
http://git-wip-us.apache.org/repos/asf/oozie/blob/cb5f3760/core/src/test/java/org/apache/oozie/client/TestOozieCLI.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/client/TestOozieCLI.java b/core/src/test/java/org/apache/oozie/client/TestOozieCLI.java
index e56b679..b654e48 100644
--- a/core/src/test/java/org/apache/oozie/client/TestOozieCLI.java
+++ b/core/src/test/java/org/apache/oozie/client/TestOozieCLI.java
@@ -500,6 +500,27 @@ public class TestOozieCLI extends DagServletTestCase {
});
}
+ public void testBulkCommandWithoutFilterNegative() throws Exception {
+ runTest(END_POINTS, SERVLET_CLASSES, IS_SECURITY_ENABLED, new Callable<Void>() {
+ @Override
+ public Void call() throws Exception {
+ String oozieUrl = getContextURL();
+ String[] args = new String[]{"jobs", "-oozie", oozieUrl, "-suspend", "-jobtype", "coordinator"};
+ assertEquals(-1, new OozieCLI().run(args));
+ assertNull(MockCoordinatorEngineService.did);
+
+ args = new String[]{"jobs", "-oozie", oozieUrl, "-resume", "-jobtype", "coordinator"};
+ assertEquals(-1, new OozieCLI().run(args));
+ assertNull(MockCoordinatorEngineService.did);
+
+ args = new String[]{"jobs", "-oozie", oozieUrl, "-kill", "-jobtype", "coordinator"};
+ assertEquals(-1, new OozieCLI().run(args));
+ assertNull(MockCoordinatorEngineService.did);
+ return null;
+ }
+ });
+ }
+
/**
* Test the working of coord action kill from Client with action numbers
*
http://git-wip-us.apache.org/repos/asf/oozie/blob/cb5f3760/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 342c79f..37572f3 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
-- Oozie 4.2.0 release (trunk - unreleased)
+OOZIE-2232 Oozie should invalidate bulk write command when "-filter" is missing (venkatnrangan via bzhang)
OOZIE-2224 Add example worklfow.xml for hive in secure mode (venkatnrangan via bzhang)
OOZIE-2227 PartitionDependencyManagerService keeps on purging delete coord actions (puru)
OOZIE-2163 Remove CoordinatorStore (seoeun25 via bzhang)