[ https://issues.apache.org/jira/browse/BEAM-4297?focusedWorklogId=105211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-105211 ]
ASF GitHub Bot logged work on BEAM-4297: ---------------------------------------- Author: ASF GitHub Bot Created on: 23/May/18 18:08 Start Date: 23/May/18 18:08 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #5407: [BEAM-4297] Streaming executable stage translation and operator for portable Flink runner. URL: https://github.com/apache/beam/pull/5407#discussion_r190340103 ########## File path: runners/flink/src/main/java/org/apache/beam/runners/flink/translation/utils/FlinkPipelineTranslatorUtils.java ########## @@ -0,0 +1,40 @@ +/* + * 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.runners.flink.translation.utils; + +import com.google.common.collect.BiMap; +import com.google.common.collect.ImmutableBiMap; + +/** + * Utilities for pipeline translation. + */ +public final class FlinkPipelineTranslatorUtils { + private FlinkPipelineTranslatorUtils() {} + + /** Creates a mapping from PCollection id to output tag integer. */ + public static BiMap<String, Integer> createOutputMap(Iterable<String> localOutputs) { + ImmutableBiMap.Builder<String, Integer> builder = ImmutableBiMap.builder(); + int outputIndex = 0; + for (String tag : localOutputs) { Review comment: Sort the localOutputs to get a stable indexing otherwise multiple calls to createOutputMap won't be stable. ---------------------------------------------------------------- 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 Issue Time Tracking ------------------- Worklog Id: (was: 105211) Time Spent: 1h 10m (was: 1h) > Flink portable runner executable stage operator for streaming > ------------------------------------------------------------- > > Key: BEAM-4297 > URL: https://issues.apache.org/jira/browse/BEAM-4297 > Project: Beam > Issue Type: Task > Components: runner-flink > Reporter: Thomas Weise > Assignee: Thomas Weise > Priority: Major > Labels: portability > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)