nsivabalan commented on code in PR #7336:
URL: https://github.com/apache/hudi/pull/7336#discussion_r1035462432
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieWriteHandle.java:
##########
@@ -86,6 +88,7 @@
protected HoodieTimer timer;
protected WriteStatus writeStatus;
+ protected HoodieRecordLocation newRecordLocation;
Review Comment:
Note to reviewer: record location for a given handle applies to all records.
so just reusing the same instance rather than creating new instance for every
record.
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestWriteStatus.java:
##########
@@ -45,12 +47,67 @@ public void testSuccessRecordTracking() {
WriteStatus status = new WriteStatus(false, 1.0);
Throwable t = new Exception("some error in writing");
for (int i = 0; i < 1000; i++) {
- status.markSuccess(mock(HoodieRecord.class), Option.empty());
- status.markFailure(mock(HoodieRecord.class), t, Option.empty());
+ status.markSuccess(new HoodieKeyWithLocation(new
HoodieKey(UUID.randomUUID().toString(), "path1"), null, Option.empty()),
Option.empty());
+ status.markFailure(new HoodieKeyWithLocation(new
HoodieKey(UUID.randomUUID().toString(), "path1"), null, Option.empty()), t,
Option.empty());
}
assertEquals(1000, status.getFailedRecords().size());
assertTrue(status.hasErrors());
assertTrue(status.getWrittenRecords().isEmpty());
assertEquals(2000, status.getTotalRecords());
}
+
+ @Test
+ public void testFailureFractionExtended() {
Review Comment:
moved tests from deleted test file (TestHoodieInternalWriteStatus)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]