codope commented on code in PR #10067:
URL: https://github.com/apache/hudi/pull/10067#discussion_r1395527467
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -999,14 +1007,19 @@ public void runMetaSync() {
Map<String, HoodieException> failedMetaSyncs = new HashMap<>();
for (String impl : syncClientToolClasses) {
Timer.Context syncContext = metrics.getMetaSyncTimerContext();
+ boolean success = false;
try {
SyncUtilHelpers.runHoodieMetaSync(impl.trim(), metaProps, conf, fs,
cfg.targetBasePath, cfg.baseFileFormat);
+ success = true;
} catch (HoodieMetaSyncException e) {
- LOG.warn("SyncTool class " + impl.trim() + " failed with exception",
e);
+ LOG.error("SyncTool class " + impl.trim() + " failed with
exception", e);
Review Comment:
Since we don't fail the pipeline, should we keep it warn level?
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -999,14 +1007,19 @@ public void runMetaSync() {
Map<String, HoodieException> failedMetaSyncs = new HashMap<>();
for (String impl : syncClientToolClasses) {
Timer.Context syncContext = metrics.getMetaSyncTimerContext();
+ boolean success = false;
try {
SyncUtilHelpers.runHoodieMetaSync(impl.trim(), metaProps, conf, fs,
cfg.targetBasePath, cfg.baseFileFormat);
+ success = true;
} catch (HoodieMetaSyncException e) {
- LOG.warn("SyncTool class " + impl.trim() + " failed with exception",
e);
+ LOG.error("SyncTool class " + impl.trim() + " failed with
exception", e);
failedMetaSyncs.put(impl, e);
}
long metaSyncTimeMs = syncContext != null ? syncContext.stop() : 0;
metrics.updateStreamerMetaSyncMetrics(getSyncClassShortName(impl),
metaSyncTimeMs);
+ if (success) {
+ LOG.info("[MetaSync] SyncTool class " + impl.trim() + " completed
successfully and took " + metaSyncTimeMs);
Review Comment:
+1, let's use template style
--
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]