HDFS-7008. xlator should be closed upon exit from DFSAdmin#genericRefresh(). (ozawa)
(cherry picked from commit b53fd7163b
)
This commit is contained in:
parent
b9e82e27f5
commit
280dda5bcd
|
@ -714,6 +714,9 @@ Release 2.7.0 - UNRELEASED
|
|||
HDFS-7805. NameNode recovery prompt should be printed on console (Surendra
|
||||
Singh Lilhore via Colin P. McCabe)
|
||||
|
||||
HDFS-7008. xlator should be closed upon exit from DFSAdmin#genericRefresh().
|
||||
(ozawa)
|
||||
|
||||
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
||||
|
|
|
@ -1496,11 +1496,11 @@ public class DFSAdmin extends FsShell {
|
|||
RPC.getProxy(xface, RPC.getProtocolVersion(xface), address,
|
||||
ugi, conf, NetUtils.getDefaultSocketFactory(conf), 0);
|
||||
|
||||
GenericRefreshProtocol xlator =
|
||||
new GenericRefreshProtocolClientSideTranslatorPB(proxy);
|
||||
|
||||
Collection<RefreshResponse> responses = null;
|
||||
try (GenericRefreshProtocolClientSideTranslatorPB xlator =
|
||||
new GenericRefreshProtocolClientSideTranslatorPB(proxy);) {
|
||||
// Refresh
|
||||
Collection<RefreshResponse> responses = xlator.refresh(identifier, args);
|
||||
responses = xlator.refresh(identifier, args);
|
||||
|
||||
int returnCode = 0;
|
||||
|
||||
|
@ -1518,8 +1518,13 @@ public class DFSAdmin extends FsShell {
|
|||
returnCode = - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return returnCode;
|
||||
} finally {
|
||||
if (responses == null) {
|
||||
System.out.println("Failed to get response.\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue