Repository: oozie Updated Branches: refs/heads/master f9be9f0c1 -> 68ef6b2f0
OOZIE-2061 Remove CoordJobDeleteJPAExecutor (dbist13 via gezapeti) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/68ef6b2f Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/68ef6b2f Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/68ef6b2f Branch: refs/heads/master Commit: 68ef6b2f018e91559f4d6cf6374893839fd0b4d8 Parents: f9be9f0 Author: Gezapeti Cseh <gezap...@apache.org> Authored: Sat Nov 11 22:08:07 2017 +0100 Committer: Gezapeti Cseh <gezap...@apache.org> Committed: Sat Nov 11 22:08:07 2017 +0100 ---------------------------------------------------------------------- .../executor/jpa/CoordJobDeleteJPAExecutor.java | 57 ------------------ .../jpa/TestCoordJobDeleteJPAExecutor.java | 63 -------------------- release-log.txt | 1 + 3 files changed, 1 insertion(+), 120 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/68ef6b2f/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobDeleteJPAExecutor.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobDeleteJPAExecutor.java b/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobDeleteJPAExecutor.java deleted file mode 100644 index c73cffb..0000000 --- a/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobDeleteJPAExecutor.java +++ /dev/null @@ -1,57 +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.oozie.executor.jpa; - -import javax.persistence.EntityManager; - -import org.apache.oozie.CoordinatorJobBean; -import org.apache.oozie.util.ParamChecker; - -/** - * Delete coord job - */ -public class CoordJobDeleteJPAExecutor implements JPAExecutor<Void> { - - private String coordJobId = null; - - public CoordJobDeleteJPAExecutor(String coordJobId) { - ParamChecker.notEmpty(coordJobId, "coordJobId"); - this.coordJobId = coordJobId; - } - - /* (non-Javadoc) - * @see org.apache.oozie.executor.jpa.JPAExecutor#execute(javax.persistence.EntityManager) - */ - @Override - public Void execute(EntityManager em) throws JPAExecutorException { - CoordinatorJobBean job = em.find(CoordinatorJobBean.class, this.coordJobId); - if (job != null) { - em.remove(job); - } - return null; - } - - /* (non-Javadoc) - * @see org.apache.oozie.executor.jpa.JPAExecutor#getName() - */ - @Override - public String getName() { - return "CoordJobDeleteJPAExecutor"; - } -} http://git-wip-us.apache.org/repos/asf/oozie/blob/68ef6b2f/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobDeleteJPAExecutor.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobDeleteJPAExecutor.java b/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobDeleteJPAExecutor.java deleted file mode 100644 index 5abf955..0000000 --- a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobDeleteJPAExecutor.java +++ /dev/null @@ -1,63 +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.oozie.executor.jpa; - -import org.apache.oozie.CoordinatorJobBean; -import org.apache.oozie.client.CoordinatorJob; -import org.apache.oozie.local.LocalOozie; -import org.apache.oozie.service.JPAService; -import org.apache.oozie.service.Services; -import org.apache.oozie.test.XDataTestCase; - -public class TestCoordJobDeleteJPAExecutor extends XDataTestCase { - Services services; - - @Override - protected void setUp() throws Exception { - super.setUp(); - services = new Services(); - services.init(); - } - - @Override - protected void tearDown() throws Exception { - services.destroy(); - super.tearDown(); - } - - public void testCoordJobDelete() throws Exception { - CoordinatorJobBean job = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false); - _testCoordJobDelete(job.getId()); - } - - private void _testCoordJobDelete(String jobId) throws Exception { - JPAService jpaService = Services.get().get(JPAService.class); - assertNotNull(jpaService); - CoordJobDeleteJPAExecutor coordDelCmd = new CoordJobDeleteJPAExecutor(jobId); - jpaService.execute(coordDelCmd); - try { - CoordJobGetJPAExecutor coordGetCmd = new CoordJobGetJPAExecutor(jobId); - CoordinatorJobBean ret = jpaService.execute(coordGetCmd); - fail("Job should not be there"); - } - catch (Exception ex) { - } - } - -} http://git-wip-us.apache.org/repos/asf/oozie/blob/68ef6b2f/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index f71cf5c..b19658a 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 5.0.0 release (trunk - unreleased) +OOZIE-2061 Remove CoordJobDeleteJPAExecutor (dbist13 via gezapeti) OOZIE-2997 files contain trailing white spaces in client lib (dbist13 via gezapeti) OOZIE-3101 Oozie should add error message to the response body (satishsaley) OOZIE-2964 Add -Xdoclint:all to javadoc opts (dbist13 via andras.piros)