zhangyue19921010 commented on code in PR #6133:
URL: https://github.com/apache/hudi/pull/6133#discussion_r1028233986
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieClientMultiWriter.java:
##########
@@ -658,4 +740,56 @@ private JavaRDD<WriteStatus>
startCommitForUpdate(HoodieWriteConfig writeConfig,
assertNoWriteErrors(statuses);
return result;
}
+
+ public static Stream<Arguments> configParams() {
+ Object[][] data =
+ new Object[][] {{"COPY_ON_WRITE",
MarkerType.TIMELINE_SERVER_BASED.name()}, {"MERGE_ON_READ",
MarkerType.TIMELINE_SERVER_BASED.name()},
+ {"MERGE_ON_READ", MarkerType.DIRECT.name()}, {"COPY_ON_WRITE",
MarkerType.DIRECT.name()}};
+ return Stream.of(data).map(Arguments::of);
+ }
+
+ private HoodieWriteConfig buildWriteConfigForEarlyConflictDetect(String
markerType, Properties properties) {
+ if (markerType.equalsIgnoreCase(MarkerType.DIRECT.name())) {
+ return getConfigBuilder()
+ .withHeartbeatIntervalInMs(3600 * 1000)
+ .withFileSystemViewConfig(FileSystemViewStorageConfig.newBuilder()
+ .withStorageType(FileSystemViewStorageType.MEMORY)
+
.withSecondaryStorageType(FileSystemViewStorageType.MEMORY).build())
+ .withCleanConfig(HoodieCleanConfig.newBuilder()
+
.withFailedWritesCleaningPolicy(HoodieFailedWritesCleaningPolicy.LAZY)
+ .withAutoClean(false).build())
+ .withArchivalConfig(HoodieArchivalConfig.newBuilder()
+ .withAutoArchive(false).build())
+
.withWriteConcurrencyMode(WriteConcurrencyMode.OPTIMISTIC_CONCURRENCY_CONTROL)
+ .withMarkersType(MarkerType.DIRECT.name())
+
.withLockConfig(HoodieLockConfig.newBuilder().withLockProvider(InProcessLockProvider.class)
+ .withEarlyConflictDetectionEnable(true)
+
.withEarlyConflictDetectionStrategy(SimpleDirectMarkerBasedEarlyConflictDetectionStrategy.class.getName())
Review Comment:
Add!
--
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]