satishkotha commented on a change in pull request #2784:
URL: https://github.com/apache/hudi/pull/2784#discussion_r611774078
##########
File path:
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/io/TestHoodieTimelineArchiveLog.java
##########
@@ -248,7 +252,7 @@ public void testArchiveTableWithReplacedFiles() throws
Exception {
metaClient = HoodieTableMetaClient.reload(metaClient);
HoodieTimeline timeline =
metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants();
HoodieTable table = HoodieSparkTable.create(cfg, context, metaClient);
- assertEquals(4, timeline.countInstants(), "Loaded 4 commits and the count
should match");
+ assertEquals(5, timeline.countInstants(), "Loaded 4 commits and the count
should match");
Review comment:
nit: can you also update error message to say "Loaded 5 commits..."
##########
File path:
hudi-common/src/test/java/org/apache/hudi/common/testutils/FileCreateUtils.java
##########
@@ -157,11 +157,19 @@ public static void createReplaceCommit(String basePath,
String instantTime, Hood
}
public static void createRequestedReplaceCommit(String basePath, String
instantTime, HoodieRequestedReplaceMetadata requestedReplaceMetadata) throws
IOException {
- createMetaFile(basePath, instantTime,
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION,
serializeRequestedReplaceMetadata(requestedReplaceMetadata).get());
+ if (null != requestedReplaceMetadata) {
+ createMetaFile(basePath, instantTime,
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION,
serializeRequestedReplaceMetadata(requestedReplaceMetadata).get());
+ } else {
+ createMetaFile(basePath, instantTime,
HoodieTimeline.REQUESTED_REPLACE_COMMIT_EXTENSION, new byte[0]);
Review comment:
nit: i dont think you need 'new byte[0]'?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]