beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [23/50] [abbrv] beam git commit: Javadoc fixups after style guide changes
Date Tue, 25 Apr 2017 17:30:18 GMT
Javadoc fixups after style guide changes


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/f83a7d58
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/f83a7d58
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/f83a7d58

Branch: refs/heads/jstorm-runner
Commit: f83a7d58f90db0a92b810dadbf85fe5b1eb2f057
Parents: 14e5cd2
Author: Eugene Kirpichov <kirpichov@google.com>
Authored: Thu Apr 13 16:55:12 2017 -0700
Committer: Eugene Kirpichov <kirpichov@google.com>
Committed: Mon Apr 17 09:58:47 2017 -0700

----------------------------------------------------------------------
 .../beam/sdk/transforms/FlatMapElements.java    |  4 ++--
 .../apache/beam/sdk/transforms/MapElements.java |  4 ++--
 .../org/apache/beam/sdk/transforms/ParDo.java   |  5 ++--
 .../apache/beam/sdk/values/TypeDescriptors.java | 25 ++++++++++----------
 4 files changed, 18 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/f83a7d58/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
index 0983165..a8a94f9 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/FlatMapElements.java
@@ -103,8 +103,8 @@ extends PTransform<PCollection<? extends InputT>, PCollection<OutputT>>
{
    * <p>Example of use in Java 8:
    * <pre>{@code
    * PCollection<String> words = lines.apply(
-   *     FlatMapElements.via((String line) -> Arrays.asList(line.split(" ")))
-   *         .withOutputType(new TypeDescriptor<String>(){});
+   *     FlatMapElements.into(TypeDescriptors.strings())
+   *                    .via((String line) -> Arrays.asList(line.split(" ")))
    * }</pre>
    *
    * <p>In Java 7, the overload {@link #via(SimpleFunction)} is more concise as the
output type

http://git-wip-us.apache.org/repos/asf/beam/blob/f83a7d58/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
index 82cf753..792a6d5 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/MapElements.java
@@ -95,8 +95,8 @@ extends PTransform<PCollection<? extends InputT>, PCollection<OutputT>>
{
    *
    * <pre>{@code
    * PCollection<Integer> wordLengths = words.apply(
-   *     MapElements.via((String word) -> word.length())
-   *         .withOutputType(new TypeDescriptor<Integer>() {});
+   *     MapElements.into(TypeDescriptors.integers())
+   *                .via((String word) -> word.length()));
    * }</pre>
    *
    * <p>In Java 7, the overload {@link #via(SimpleFunction)} is more concise as the
output type

http://git-wip-us.apache.org/repos/asf/beam/blob/f83a7d58/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
index e3777ac..c0633b6 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
@@ -169,8 +169,7 @@ import org.apache.beam.sdk.values.TypedPValue;
  * final PCollectionView<Integer> maxWordLengthCutOffView =
  *     maxWordLengthCutOff.apply(View.<Integer>asSingleton());
  * PCollection<String> wordsBelowCutOff =
- *     words.apply(ParDo.withSideInputs(maxWordLengthCutOffView)
- *                      .of(new DoFn<String, String>() {
+ *     words.apply(ParDo.of(new DoFn<String, String>() {
  *        {@literal @}ProcessElement
  *         public void processElement(ProcessContext c) {
  *           String word = c.element();
@@ -178,7 +177,7 @@ import org.apache.beam.sdk.values.TypedPValue;
  *           if (word.length() <= lengthCutOff) {
  *             c.output(word);
  *           }
- *         }}));
+ *         }}).withSideInputs(maxWordLengthCutOffView));
  * }</pre>
  *
  * <h2>Additional Outputs</h2>

http://git-wip-us.apache.org/repos/asf/beam/blob/f83a7d58/sdks/java/core/src/main/java/org/apache/beam/sdk/values/TypeDescriptors.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/TypeDescriptors.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/TypeDescriptors.java
index b6b1a1a..a4626c9 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/TypeDescriptors.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/TypeDescriptors.java
@@ -184,10 +184,9 @@ public class TypeDescriptors {
    * <pre>
    * {@code
    * PCollection<String> words = ...;
-   * PCollection<KV<String, String>> words = words.apply(
-   *            FlatMapElements.via(...)
-   *            .withOutputType(
-   *              TypeDescriptors.kv(TypeDescriptors.strings(), TypeDescriptors.strings())));
+   * PCollection<KV<String, String>> words = words.apply(FlatMapElements
+   *         .into(TypeDescriptors.kv(TypeDescriptors.strings(), TypeDescriptors.strings()))
+   *         .via(...));
    * }
    * </pre>
    * @param key The {@link TypeDescriptor} for the key
@@ -215,9 +214,9 @@ public class TypeDescriptors {
    * <pre>
    * {@code
    * PCollection<String> words = ...;
-   * PCollection<Set<String>> words = words.apply(
-   *            FlatMapElements.via(...)
-   *            .withOutputType(TypeDescriptors.sets(TypeDescriptors.strings())));
+   * PCollection<Set<String>> words = words.apply(FlatMapElements
+   *         .into(TypeDescriptors.sets(TypeDescriptors.strings()))
+   *         .via(...));
    * }
    * </pre>
    * @param element The {@link TypeDescriptor} for the set
@@ -243,9 +242,9 @@ public class TypeDescriptors {
    * <pre>
    * {@code
    * PCollection<String> words = ...;
-   * PCollection<List<String>> words = words.apply(
-   *            FlatMapElements.via(...)
-   *            .withOutputType(TypeDescriptors.lists(TypeDescriptors.strings())));
+   * PCollection<List<String>> words = words.apply(FlatMapElements
+   *         .into(TypeDescriptors.lists(TypeDescriptors.strings()))
+   *         .via(...));
    * }
    * </pre>
    * @param element The {@link TypeDescriptor} for the list
@@ -271,9 +270,9 @@ public class TypeDescriptors {
    * <pre>
    * {@code
    * PCollection<String> words = ...;
-   * PCollection<Iterable<String>> words = words.apply(
-   *            FlatMapElements.via(...)
-   *            .withOutputType(TypeDescriptors.iterables(TypeDescriptors.strings())));
+   * PCollection<Iterable<String>> words = words.apply(FlatMapElements
+   *         .into(TypeDescriptors.iterables(TypeDescriptors.strings()))
+   *         .via(...));
    * }
    * </pre>
    * @param iterable The {@link TypeDescriptor} for the iterable


Mime
View raw message