Skip to content

Commit

Permalink
Fixes #126
Browse files Browse the repository at this point in the history
  • Loading branch information
mwullink committed Jun 9, 2020
1 parent 9779df7 commit 4c8dac4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/main/java/nl/sidnlabs/entrada/file/HDFSFileManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4c8dac4

Please sign in to comment.