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
|
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