diff --git a/src/main/java/nl/sidnlabs/entrada/file/HDFSFileManagerImpl.java b/src/main/java/nl/sidnlabs/entrada/file/HDFSFileManagerImpl.java index a010a8c..eb353de 100644 --- a/src/main/java/nl/sidnlabs/entrada/file/HDFSFileManagerImpl.java +++ b/src/main/java/nl/sidnlabs/entrada/file/HDFSFileManagerImpl.java @@ -64,17 +64,15 @@ public String schema() { @Override public void close() { // close filesystem - if (fs == null) { - // do nothing, not using hdfs fs - return; + if (fs != null) { + try { + fs.close(); + fs = null; + } catch (Exception e) { + log.error("Error while closing filesystem", e); + } } - try { - fs.close(); - fs = null; - } catch (Exception e) { - log.error("Error while closing filesystem", e); - } // close filesystem internal cache try { FileSystem.closeAll();