jonvex commented on code in PR #12789:
URL: https://github.com/apache/hudi/pull/12789#discussion_r1956651767
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -161,13 +166,14 @@ public HoodieWriteMetadata<HoodieData<WriteStatus>>
execute(HoodieData<HoodieRec
HoodieData<HoodieRecord<T>> inputRecordsWithClusteringUpdate =
clusteringHandleUpdate(inputRecords);
context.setJobStatus(this.getClass().getSimpleName(), "Building workload
profile:" + config.getTableName());
- HoodieTimer sourceReadAndIndexTimer = HoodieTimer.start(); // time taken
from dedup -> tag location -> building workload profile
WorkloadProfile workloadProfile =
new WorkloadProfile(buildProfile(inputRecordsWithClusteringUpdate),
operationType, table.getIndex().canIndexLogFiles());
LOG.debug("Input workload profile :" + workloadProfile);
- long sourceReadAndIndexDurationMs = sourceReadAndIndexTimer.endTimer();
- LOG.info("Source read and index timer " + sourceReadAndIndexDurationMs);
-
+ Long sourceReadAndIndexDurationMs = null;
+ if (sourceReadAndIndexTimer.isPresent()) {
+ sourceReadAndIndexDurationMs = sourceReadAndIndexTimer.get().endTimer();
+ LOG.info("Source read and index timer " + sourceReadAndIndexDurationMs);
Review Comment:
nit {}
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/BaseSparkCommitActionExecutor.java:
##########
@@ -161,13 +166,14 @@ public HoodieWriteMetadata<HoodieData<WriteStatus>>
execute(HoodieData<HoodieRec
HoodieData<HoodieRecord<T>> inputRecordsWithClusteringUpdate =
clusteringHandleUpdate(inputRecords);
context.setJobStatus(this.getClass().getSimpleName(), "Building workload
profile:" + config.getTableName());
- HoodieTimer sourceReadAndIndexTimer = HoodieTimer.start(); // time taken
from dedup -> tag location -> building workload profile
WorkloadProfile workloadProfile =
new WorkloadProfile(buildProfile(inputRecordsWithClusteringUpdate),
operationType, table.getIndex().canIndexLogFiles());
LOG.debug("Input workload profile :" + workloadProfile);
Review Comment:
nit {}
##########
hudi-client/hudi-java-client/src/main/java/org/apache/hudi/table/action/commit/BaseJavaCommitActionExecutor.java:
##########
@@ -86,12 +87,21 @@ public BaseJavaCommitActionExecutor(HoodieEngineContext
context,
@Override
public HoodieWriteMetadata<List<WriteStatus>> execute(List<HoodieRecord<T>>
inputRecords) {
+ return execute(inputRecords, Option.empty());
+ }
+
+ @Override
+ public HoodieWriteMetadata<List<WriteStatus>> execute(List<HoodieRecord<T>>
inputRecords, Option<HoodieTimer> sourceReadAndIndexTimer) {
HoodieWriteMetadata<List<WriteStatus>> result = new
HoodieWriteMetadata<>();
WorkloadProfile workloadProfile =
new WorkloadProfile(buildProfile(inputRecords),
table.getIndex().canIndexLogFiles());
LOG.info("Input workload profile :" + workloadProfile);
-
+ Long sourceReadAndIndexDurationMs = null;
+ if (sourceReadAndIndexTimer.isPresent()) {
+ sourceReadAndIndexDurationMs = sourceReadAndIndexTimer.get().endTimer();
+ LOG.info("Source read and index timer " + sourceReadAndIndexDurationMs);
Review Comment:
nit {}
--
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]