@Override public void close() { if (!state.equals(ReaderWriterState.OPEN)) { return; } LOG.debug("Closing reader on path:{}", path); try { reader.close(); } catch (IOException e) { this.state = ReaderWriterState.ERROR; throw new DatasetIOException("Unable to close reader path:" + path, e); } state = ReaderWriterState.CLOSED; }
reader.close();