You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ec...@apache.org on 2019/07/09 13:18:50 UTC

[beam] 33/45: Clean not more needed WindowingHelpers

This is an automated email from the ASF dual-hosted git repository.

echauchot pushed a commit to branch spark-runner_structured-streaming
in repository https://gitbox.apache.org/repos/asf/beam.git

commit ea959c6391c2bd44b29e1d19c5a7c0a6cbd4fc53
Author: Etienne Chauchot <ec...@apache.org>
AuthorDate: Thu Jul 4 11:25:31 2019 +0200

    Clean not more needed WindowingHelpers
---
 .../translation/helpers/WindowingHelpers.java      | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/WindowingHelpers.java b/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/WindowingHelpers.java
index 448918a..38ba54b 100644
--- a/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/WindowingHelpers.java
+++ b/runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/translation/helpers/WindowingHelpers.java
@@ -33,28 +33,6 @@ import org.joda.time.Instant;
 public final class WindowingHelpers {
 
   /**
-   * A Spark {@link MapFunction} for converting a value to a {@link WindowedValue}. The resulting
-   * {@link WindowedValue} will be in a global windows, and will have the default timestamp == MIN
-   * and pane.
-   *
-   * @param <T> The type of the object.
-   * @return A {@link MapFunction} that accepts an object and returns its {@link WindowedValue}.
-   */
-  public static <T> MapFunction<T, WindowedValue<T>> windowMapFunction() {
-    return (MapFunction<T, WindowedValue<T>>) WindowedValue::valueInGlobalWindow;
-  }
-
-  /**
-   * A Spark {@link MapFunction} for extracting the value from a {@link WindowedValue}.
-   *
-   * @param <T> The type of the object.
-   * @return A {@link MapFunction} that accepts a {@link WindowedValue} and returns its value.
-   */
-  public static <T> MapFunction<WindowedValue<T>, T> unwindowMapFunction() {
-    return (MapFunction<WindowedValue<T>, T>) WindowedValue::getValue;
-  }
-
-  /**
    * Checks if the window transformation should be applied or skipped.
    *
    * <p>Avoid running assign windows if both source and destination are global window or if the user