kennknowles commented on a change in pull request #13118:
URL: https://github.com/apache/beam/pull/13118#discussion_r508962544



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/runners/PTransformReplacements.java
##########
@@ -15,20 +15,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.beam.runners.core.construction;
+package org.apache.beam.sdk.runners;
 
 import static 
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
 
 import java.util.Map;
 import java.util.Set;
-import org.apache.beam.sdk.runners.AppliedPTransform;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Internal;
 import org.apache.beam.sdk.transforms.PTransform;
 import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.sdk.values.PValue;
 import org.apache.beam.sdk.values.TupleTag;
 import 
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
 
 /** */
+@Internal

Review comment:
       I don't agree with this. There are many reasons
   
    - Protos are about wire formats and often not preferred. One time they are 
very much not preferred is when the proto is a low-level representation of a 
higher-level concept, like a graph.
    - The SDKs are specifically designed to be the best API for writing correct 
Beam subgraphs. Using them is better than direct graph manipulation (and graph 
manipulation is better than proto manipulation).
   
   I may have misunderstood what you meant by "proto -> proto" conversions. But 
if it is to serve the same purpose as `Pipeline#replaceAll` then I think it 
should look more or less the same. We could remove `Pipeline#replaceAll` from 
the core SDK and have an enhanced version just for runners, but that is a lot 
of complexity.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to