johnyangk commented on a change in pull request #63: [NEMO-124] Support 
DoFn#output(tag, output)
URL: https://github.com/apache/incubator-nemo/pull/63#discussion_r199429645
 
 

 ##########
 File path: 
examples/beam/src/main/java/edu/snu/nemo/examples/beam/AdditionalOutputs.java
 ##########
 @@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2018 Seoul National University
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.snu.nemo.examples.beam;
+
+import edu.snu.nemo.compiler.frontend.beam.NemoPipelineOptions;
+import edu.snu.nemo.compiler.frontend.beam.NemoPipelineRunner;
+import org.apache.beam.sdk.Pipeline;
+import org.apache.beam.sdk.options.PipelineOptions;
+import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.FlatMapElements;
+import org.apache.beam.sdk.transforms.MapElements;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.values.*;
+
+import java.util.Arrays;
+
+/**
+ * Additional Tagged Outputs application.
+ */
+public final class AdditionalOutputs {
+  /**
+   * Private Constructor.
+   */
+  private AdditionalOutputs() {
+  }
+
+  /**
+   * Main function for the MR BEAM program.
+   *
+   * @param args arguments.
+   */
+  public static void main(final String[] args) {
+    final String inputFilePath = args[0];
+    final String outputFilePath = args[1];
+    final PipelineOptions options = 
PipelineOptionsFactory.create().as(NemoPipelineOptions.class);
+    options.setRunner(NemoPipelineRunner.class);
+    options.setJobName("AdditionalOutputs");
+
+    final TupleTag<String> shortWordsTag = new TupleTag<String>() {
+    };
 
 Review comment:
   Add a comment to explain the {}s?
   Something like...
   
   // {} here is required for preserving type information.
   // Please see https://stackoverflow.com/a/48431397 for details.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to