@Override public String getJobLog() throws OozieClientException { try { return oozieClient.getJobLog( id ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public String getProtocolUrl() throws OozieClientException { try { return delegate.getProtocolUrl(); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public String getJobLog() throws OozieClientException { try { return oozieClient.getJobLog( id ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public String getProtocolUrl() throws OozieClientException { try { return delegate.getProtocolUrl(); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public void validateWSVersion() throws OozieClientException { try { delegate.validateWSVersion(); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public void validateWSVersion() throws OozieClientException { try { delegate.validateWSVersion(); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public OozieJob run( Properties props ) throws OozieClientException { try { String jobId = delegate.run( props ); return new OozieJobInfoImpl( jobId, delegate ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public OozieJob run( Properties props ) throws OozieClientException { try { String jobId = delegate.run( props ); return new OozieJobInfoImpl( jobId, delegate ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public boolean didSucceed() throws OozieClientException { try { return oozieClient.getJobInfo( id ).getStatus().equals( WorkflowJob.Status.SUCCEEDED ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public boolean didSucceed() throws OozieClientException { try { return oozieClient.getJobInfo( id ).getStatus().equals( WorkflowJob.Status.SUCCEEDED ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public boolean isRunning() throws OozieClientException { try { return oozieClient.getJobInfo( id ).getStatus().equals( WorkflowJob.Status.RUNNING ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
@Override public boolean isRunning() throws OozieClientException { try { return oozieClient.getJobInfo( id ).getStatus().equals( WorkflowJob.Status.RUNNING ); } catch ( org.apache.oozie.client.OozieClientException e ) { throw new OozieClientException( e, e.getErrorCode() ); } }
public void testErrorCodeMessageCause() { OozieClientException ex = new OozieClientException("errorCode", "message", new Exception()); assertEquals("errorCode", ex.getErrorCode()); assertTrue(ex.getMessage().contains("message")); assertNotNull(ex.getCause()); assertTrue(ex.toString().contains("errorCode") && ex.toString().contains("message")); }
public void testErrorCodeCause() { OozieClientException ex = new OozieClientException("errorCode", new Exception("message")); assertEquals("errorCode", ex.getErrorCode()); assertTrue(ex.getMessage().contains("message")); assertNotNull(ex.getCause()); assertTrue(ex.toString().contains("errorCode") && ex.toString().contains("message")); }
@Override public Void call() throws Exception { String oozieUrl = getContextURL() + "dummy"; OozieClient wc = new OozieClient(oozieUrl); try { wc.getJobInfo(MockDagEngineService.JOB_ID + 1); fail(); } catch (OozieClientException e) { assertNotNull(e.getErrorCode()); assertNotNull(e.getMessage()); } return null; }
public void testErrorCodeMessage() { OozieClientException ex = new OozieClientException("errorCode", "message"); assertEquals("errorCode", ex.getErrorCode()); assertEquals("message", ex.getMessage()); assertNull(ex.getCause()); assertTrue(ex.toString().contains("errorCode") && ex.toString().contains("message")); }
if (!ex.getErrorCode().equals(ErrorCode.E1018.toString())) { fail("Error code should be E1018 when action is not in terminal state.");
public void testReRun2() { OozieClient client = LocalOozie.getCoordClient(); try { client.reRun("foo-id", client.createConfiguration()); fail("OozieClientException expected."); } catch (OozieClientException oce) { assertEquals(ErrorCode.E0301.toString(), oce.getErrorCode()); } }
public void testGetJobsInfo() { OozieClient client = LocalOozie.getCoordClient(); try { client.getJobsInfo("foo"); fail("OozieClientException expected."); } catch (OozieClientException oce) { assertEquals(ErrorCode.E0301.toString(), oce.getErrorCode()); } try { client.getJobsInfo("foo", 0, 5); fail("OozieClientException expected."); } catch (OozieClientException oce) { assertEquals(ErrorCode.E0301.toString(), oce.getErrorCode()); } try { client.getJobInfo("foo-id"); fail("OozieClientException expected."); } catch (OozieClientException oce) { assertEquals(ErrorCode.E0301.toString(), oce.getErrorCode()); } }
assertTrue(ex.getErrorCode() == ErrorCode.E0605.toString());