MAPREDUCE-6075. HistoryServerFileSystemStateStore can create zero-length files. Contributed by Jason Lowe
This commit is contained in:
parent
7d38ffc8d3
commit
7f80e14209
|
@ -276,6 +276,9 @@ Release 2.6.0 - UNRELEASED
|
|||
MAPREDUCE-6071. JobImpl#makeUberDecision doesn't log that Uber mode is
|
||||
disabled because of too much CPUs (Tsuyoshi OZAWA via jlowe)
|
||||
|
||||
MAPREDUCE-6075. HistoryServerFileSystemStateStore can create zero-length
|
||||
files (jlowe)
|
||||
|
||||
Release 2.5.1 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -189,6 +189,8 @@ public class HistoryServerFileSystemStateStoreService
|
|||
DataOutputStream dataStream = new DataOutputStream(memStream);
|
||||
try {
|
||||
key.write(dataStream);
|
||||
dataStream.close();
|
||||
dataStream = null;
|
||||
} finally {
|
||||
IOUtils.cleanup(LOG, dataStream);
|
||||
}
|
||||
|
@ -260,6 +262,8 @@ public class HistoryServerFileSystemStateStoreService
|
|||
try {
|
||||
try {
|
||||
out.write(data);
|
||||
out.close();
|
||||
out = null;
|
||||
} finally {
|
||||
IOUtils.cleanup(LOG, out);
|
||||
}
|
||||
|
@ -299,6 +303,8 @@ public class HistoryServerFileSystemStateStoreService
|
|||
try {
|
||||
tokenId.write(dataStream);
|
||||
dataStream.writeLong(renewDate);
|
||||
dataStream.close();
|
||||
dataStream = null;
|
||||
} finally {
|
||||
IOUtils.cleanup(LOG, dataStream);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue