zhangyue19921010 commented on code in PR #6133:
URL: https://github.com/apache/hudi/pull/6133#discussion_r1028233418
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/TimelineServerBasedWriteMarkers.java:
##########
@@ -132,14 +143,54 @@ protected Option<Path> create(String partitionPath,
String dataFileName, IOType
HoodieTimer timer = HoodieTimer.start();
String markerFileName = getMarkerFileName(dataFileName, type);
- Map<String, String> paramsMap = new HashMap<>();
+ Map<String, String> paramsMap = initConfigMap(partitionPath,
markerFileName);
+ boolean success = executeCreateMarkerRequest(paramsMap, partitionPath,
markerFileName);
+ LOG.info("[timeline-server-based] Created marker file " + partitionPath +
"/" + markerFileName
+ + " in " + timer.endTimer() + " ms");
+ if (success) {
+ return Option.of(new Path(FSUtils.getPartitionPath(markerDirPath,
partitionPath), markerFileName));
+ } else {
+ return Option.empty();
+ }
+ }
+
+ @Override
+ public Option<Path> createWithEarlyConflictDetection(String partitionPath,
String dataFileName, IOType type, boolean checkIfExists,
+
HoodieEarlyConflictDetectionStrategy resolutionStrategy,
+ Set<HoodieInstant>
completedCommitInstants, HoodieWriteConfig config, String fileId) {
+ HoodieTimer timer = new HoodieTimer().startTimer();
+ String markerFileName = getMarkerFileName(dataFileName, type);
+ Map<String, String> paramsMap = initConfigMap(partitionPath,
markerFileName);
+
+ paramsMap.put(MARKER_CONFLICT_CHECKER_BATCH_INTERVAL,
config.getMarkerConflictCheckerBatchInterval());
+ paramsMap.put(MARKER_CONFLICT_CHECKER_PERIOD,
config.getMarkerConflictCheckerPeriod());
Review Comment:
Changed.
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/marker/TimelineServerBasedWriteMarkers.java:
##########
@@ -132,14 +143,54 @@ protected Option<Path> create(String partitionPath,
String dataFileName, IOType
HoodieTimer timer = HoodieTimer.start();
String markerFileName = getMarkerFileName(dataFileName, type);
- Map<String, String> paramsMap = new HashMap<>();
+ Map<String, String> paramsMap = initConfigMap(partitionPath,
markerFileName);
+ boolean success = executeCreateMarkerRequest(paramsMap, partitionPath,
markerFileName);
+ LOG.info("[timeline-server-based] Created marker file " + partitionPath +
"/" + markerFileName
+ + " in " + timer.endTimer() + " ms");
+ if (success) {
+ return Option.of(new Path(FSUtils.getPartitionPath(markerDirPath,
partitionPath), markerFileName));
+ } else {
+ return Option.empty();
+ }
+ }
+
+ @Override
+ public Option<Path> createWithEarlyConflictDetection(String partitionPath,
String dataFileName, IOType type, boolean checkIfExists,
+
HoodieEarlyConflictDetectionStrategy resolutionStrategy,
+ Set<HoodieInstant>
completedCommitInstants, HoodieWriteConfig config, String fileId) {
+ HoodieTimer timer = new HoodieTimer().startTimer();
+ String markerFileName = getMarkerFileName(dataFileName, type);
+ Map<String, String> paramsMap = initConfigMap(partitionPath,
markerFileName);
+
+ paramsMap.put(MARKER_CONFLICT_CHECKER_BATCH_INTERVAL,
config.getMarkerConflictCheckerBatchInterval());
+ paramsMap.put(MARKER_CONFLICT_CHECKER_PERIOD,
config.getMarkerConflictCheckerPeriod());
paramsMap.put(MARKER_DIR_PATH_PARAM, markerDirPath.toString());
Review Comment:
Changed.
--
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]