Github user gauravgopi123 commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/191#discussion_r48569555
--- Diff:
engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlan.java ---
@@ -907,6 +912,51 @@ else if (field.getType() == float.class ||
field.getType() == Float.class ||
getValue(OperatorContext.METRICS_DIMENSIONS_SCHEME));
}
+ /**
+ * Copy attribute from source attributeMap to destination attributeMap.
+ *
+ * @param dest destination attribute map.
+ * @param source source attribute map.
+ */
+ private void copyAttributes(AttributeMap dest, AttributeMap source)
+ {
+ for (Entry<Attribute<?>, ?> a : source.entrySet()) {
+ dest.put((Attribute<Object>)a.getKey(), a.getValue());
+ }
+ }
+
+ /**
+ * Copy attribute of operator and port from provided operatorMeta.
This function requires
+ * operatorMeta argument is for the same operator.
+ *
+ * @param operatorMeta copy attribute from this OperatorMeta to the
object.
+ */
+ private void copyFrom(OperatorMeta operatorMeta)
--- End diff --
This function is in OperatorMeta class so function name gives an impression
that it does deep clone of operatorMeta from given operatorMeta but actually it
is only copying Attributes. I think it should be renamed to something different
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---