beam-commits mailing list archives

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

     [ https://issues.apache.org/jira/browse/BEAM-5149?focusedWorklogId=141518&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-141518
]

ASF GitHub Bot logged work on BEAM-5149:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Sep/18 20:16
            Start Date: 05/Sep/18 20:16
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #6222: [BEAM-5149]
Add support for the Java SDK harness to merge windows.
URL: https://github.com/apache/beam/pull/6222#discussion_r215411282
 
 

 ##########
 File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/WindowMergingFnRunner.java
 ##########
 @@ -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
+ *
+ *     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 org.apache.beam.fn.harness;
+
+import com.google.auto.service.AutoService;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Sets;
+import java.io.IOException;
+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.runners.core.construction.BeamUrns;
+import org.apache.beam.runners.core.construction.WindowingStrategyTranslation;
+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>,
iterable<KV<MergedWindow,
 
 Review comment:
   That is correct, attempting to re-use well known coders to limit the number of coders SDKs
and runners both need to agree upon instead of adding new ones.

----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 141518)
    Time Spent: 1h 20m  (was: 1h 10m)

> Add support to the Java SDK harness to merge windows
> ----------------------------------------------------
>
>                 Key: BEAM-5149
>                 URL: https://issues.apache.org/jira/browse/BEAM-5149
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-harness
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: Major
>              Labels: portability
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Window merging function:
>  
> {code:java}
> Input: KV<nonce, iterable<OriginalWindow>>
> Output: KV<nonce, KV<iterable<UnmergedOriginalWindow>, iterable<KV<MergedWindow,
iterable<ConsumedOriginalWindow>>>> 
> {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
(v7.6.3#76005)

Mime
View raw message