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