YARN-7194. Log aggregation status is always Failed with the newly added log aggregation IndexedFileFormat. Contributed by Xuan Gong.
This commit is contained in:
parent
e0b3c644e1
commit
c92c1d521e
|
@ -392,7 +392,8 @@ public class LogAggregationIndexedFileController
|
|||
this.fsDataOStream.writeInt(length);
|
||||
byte[] separator = this.uuid.getBytes(Charset.forName("UTF-8"));
|
||||
this.fsDataOStream.write(separator);
|
||||
if (logAggregationSuccessfullyInThisCyCle) {
|
||||
if (logAggregationSuccessfullyInThisCyCle &&
|
||||
record.isLogAggregationInRolling()) {
|
||||
deleteFileWithRetries(fc, ugi, remoteLogCheckSumFile);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,9 +164,7 @@ public class TestLogAggregationIndexFileController {
|
|||
fileFormat.initializeWriter(context);
|
||||
|
||||
fileFormat.write(key1, value);
|
||||
LogAggregationFileControllerContext record = mock(
|
||||
LogAggregationFileControllerContext.class);
|
||||
fileFormat.postWrite(record);
|
||||
fileFormat.postWrite(context);
|
||||
fileFormat.closeWriter();
|
||||
|
||||
ContainerLogsRequest logRequest = new ContainerLogsRequest();
|
||||
|
@ -267,7 +265,7 @@ public class TestLogAggregationIndexFileController {
|
|||
// first write and second write
|
||||
fileFormat.initializeWriter(context);
|
||||
fileFormat.write(key1, value2);
|
||||
fileFormat.postWrite(record);
|
||||
fileFormat.postWrite(context);
|
||||
fileFormat.closeWriter();
|
||||
fileFormat.readAggregatedLogsMeta(
|
||||
logRequest);
|
||||
|
|
Loading…
Reference in New Issue