xinyuiscool commented on code in PR #26649:
URL: https://github.com/apache/beam/pull/26649#discussion_r1195435078
##########
runners/samza/src/main/java/org/apache/beam/runners/samza/metrics/SamzaMetricOpFactory.java:
##########
@@ -53,17 +55,31 @@ public enum OpType {
* @return a {@link Op} for default transform metric computation
*/
public static @NonNull <T> Op<T, T, Void> createMetricOp(
+ @NonNull String urn,
@NonNull String pValue,
@NonNull String transformName,
@NonNull OpType opType,
@NonNull SamzaTransformMetricRegistry samzaTransformMetricRegistry) {
switch (opType) {
case INPUT:
+ if (isDataShuffleTransform(urn)) {
+ return new SamzaGBKMetricOp<>(
+ pValue, transformName, opType, samzaTransformMetricRegistry);
+ }
return new SamzaInputMetricOp(pValue, transformName,
samzaTransformMetricRegistry);
Review Comment:
Similar to GBKMetricOp, can we also merge SamzaInputMetricOp and
SamzaOutputMetricOp into one?
--
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]