HBASE-15291 FileSystem not closed in secure bulkLoad (Yong Zhang)
This commit is contained in:
parent
f658f3ef83
commit
4fba1c3627
|
@ -292,6 +292,16 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
|
||||||
new SecureBulkLoadListener(fs, bulkToken, conf));
|
new SecureBulkLoadListener(fs, bulkToken, conf));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Failed to complete bulk load", e);
|
LOG.error("Failed to complete bulk load", e);
|
||||||
|
} finally {
|
||||||
|
if (fs != null) {
|
||||||
|
try {
|
||||||
|
if (!UserGroupInformation.getLoginUser().equals(ugi)) {
|
||||||
|
FileSystem.closeAllForUGI(ugi);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.error("Failed to close FileSystem for " + ugi.getUserName(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue