@Override public void doDispose() throws RheemException { Actions.doSafe(() -> { logger.info("Deleting file channel instances {}.", this.paths); final String path = this.getSinglePath(); final Optional<FileSystem> fileSystemOptional = FileSystems.getFileSystem(path); fileSystemOptional.ifPresent(fs -> { try { fs.delete(path, true); } catch (IOException e) { throw new UncheckedIOException(e); } }); }); } }
@Override protected void doDispose() { if (this.accumulator != null) { this.setMeasuredCardinality(this.accumulator.value()); this.accumulator = null; } if (this.isRddCached() && this.rdd != null) { Actions.doSafe(this.rdd::unpersist); logger.debug("Unpersisted {}.", this.rdd); this.rdd = null; } }