beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (BEAM-5149) Add support to the Java SDK harness to merge windows
Date Wed, 05 Sep 2018 19:06:00 GMT


ASF GitHub Bot logged work on BEAM-5149:

                Author: ASF GitHub Bot
            Created on: 05/Sep/18 19:05
            Start Date: 05/Sep/18 19:05
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on a change in pull request #6222: [BEAM-5149]
Add support for the Java SDK harness to merge windows.

 File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/
 @@ -0,0 +1,158 @@
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ *
+ *
+ *
+ * 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 org.apache.beam.fn.harness;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.beam.model.pipeline.v1.RunnerApi;
+import org.apache.beam.model.pipeline.v1.RunnerApi.PTransform;
+import org.apache.beam.model.pipeline.v1.RunnerApi.StandardPTransforms;
+import org.apache.beam.sdk.fn.function.ThrowingFunction;
+import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
+import org.apache.beam.sdk.transforms.windowing.WindowFn;
+import org.apache.beam.sdk.transforms.windowing.WindowFn.MergeContext;
+import org.apache.beam.sdk.values.KV;
+ * Merges windows using a {@link org.apache.beam.sdk.transforms.windowing.WindowFn}.
+ *
+ * <p>Window merging function:
+ *
+ * <ul>
+ *   <li>Input: {@code KV<nonce, iterable<OriginalWindow>>}
+ *   <li>Output: {@code KV<nonce, KV<iterable<UnmergedOriginalWindow>,
 Review comment:
   Is `KV<iterable<UnmergedOriginalWindow>, ...>` here being used simply because
there's no coder that handles non-keyed pairs? Because it doesn't seem that the set of unmerged
windows is actually used as a key associated with the map of `MergedWindow` to `ConsumedOriginalWindow`,
but instead as just data paired with the map.

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:

Issue Time Tracking

    Worklog Id:     (was: 141500)

> Add support to the Java SDK harness to merge windows
> ----------------------------------------------------
>                 Key: BEAM-5149
>                 URL:
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-harness
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: Major
>              Labels: portability
>          Time Spent: 40m
>  Remaining Estimate: 0h
> Window merging function:
> {code:java}
> Input: KV<nonce, iterable<OriginalWindow>>
> Output: KV<nonce, KV<iterable<UnmergedOriginalWindow>, iterable<KV<MergedWindow,
> {code}
> For each set of original windows, a list of all unmerged windows is output alongside
a map of merged window to set of consumed windows. All original windows must be contained
in either the unmerged original window set or one of the consumed original window sets. Each
original window can only be part of one output set. The nonce is used by a runner to associate
each input with its output. The nonce is represented as an opaque set of bytes.

This message was sent by Atlassian JIRA

View raw message