private void cleanup() { try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } }
private void cleanup() { try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } }
private void cleanup() { try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } }
private void cleanup() { try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } }
@Override public void tryCleanupOnError() throws Exception { for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) { if (outputFormat instanceof CleanupWhenUnsuccessful) { ((CleanupWhenUnsuccessful) outputFormat).tryCleanupOnError(); } } rootOutputPath.getFileSystem().delete(rootOutputPath, false); }
@Override public void tryCleanupOnError() throws Exception { for (OutputFormat<IT> outputFormat : formatsPerSubdirectory.values()) { if (outputFormat instanceof CleanupWhenUnsuccessful) { ((CleanupWhenUnsuccessful) outputFormat).tryCleanupOnError(); } } rootOutputPath.getFileSystem().delete(rootOutputPath, false); }
@Override public void cancel() throws Exception { this.taskCanceled = true; OutputFormat<IT> format = this.format; if (format != null) { try { this.format.close(); } catch (Throwable t) {} // make a best effort to clean up try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } } LOG.debug(getLogString("Cancelling data sink operator")); }
@Override public void cancel() throws Exception { this.taskCanceled = true; OutputFormat<IT> format = this.format; if (format != null) { try { this.format.close(); } catch (Throwable t) {} // make a best effort to clean up try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } } LOG.debug(getLogString("Cancelling data sink operator")); }
@Override public void cancel() throws Exception { this.taskCanceled = true; OutputFormat<IT> format = this.format; if (format != null) { try { this.format.close(); } catch (Throwable t) {} // make a best effort to clean up try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } } LOG.debug(getLogString("Cancelling data sink operator")); }
@Override public void cancel() throws Exception { this.taskCanceled = true; OutputFormat<IT> format = this.format; if (format != null) { try { this.format.close(); } catch (Throwable t) {} // make a best effort to clean up try { if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError(); } } catch (Throwable t) { LOG.error("Cleanup on error failed.", t); } } LOG.debug(getLogString("Cancelling data sink operator")); }
if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError();
if (!cleanupCalled && format instanceof CleanupWhenUnsuccessful) { cleanupCalled = true; ((CleanupWhenUnsuccessful) format).tryCleanupOnError();