YARN-2988. Graph#save() may leak file descriptors. (Ted Yu via ozawa)
This commit is contained in:
parent
4f18018b7a
commit
b256dd7600
@ -284,6 +284,8 @@ Release 2.7.0 - UNRELEASED
|
|||||||
YARN-2946. Fixed potential deadlock in RMStateStore. (Rohith Sharmaks via
|
YARN-2946. Fixed potential deadlock in RMStateStore. (Rohith Sharmaks via
|
||||||
jianhe)
|
jianhe)
|
||||||
|
|
||||||
|
YARN-2988. Graph#save() may leak file descriptors. (Ted Yu via ozawa)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -188,10 +188,10 @@ public String generateGraphViz() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void save(String filepath) throws IOException {
|
public void save(String filepath) throws IOException {
|
||||||
OutputStreamWriter fout = new OutputStreamWriter(
|
try (OutputStreamWriter fout = new OutputStreamWriter(
|
||||||
new FileOutputStream(filepath), Charset.forName("UTF-8"));
|
new FileOutputStream(filepath), Charset.forName("UTF-8"));) {
|
||||||
fout.write(generateGraphViz());
|
fout.write(generateGraphViz());
|
||||||
fout.close();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Edge> combineEdges(List<Edge> edges) {
|
public static List<Edge> combineEdges(List<Edge> edges) {
|
||||||
|
Loading…
Reference in New Issue
Block a user