use of org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.BiMap in project beam by apache.
the class PCollectionOutputTagVisitor method visitValue.
@Override
public void visitValue(PValue value, Node producer) {
for (Entry<ProjectionProducer<PTransform<?, ?>>, Map<PCollection<?>, FieldAccessDescriptor>> entry : pCollFieldAccess.entrySet()) {
FieldAccessDescriptor fieldAccess = entry.getValue().get(value);
if (fieldAccess == null) {
continue;
}
BiMap<PCollection<?>, TupleTag<?>> outputs = ImmutableBiMap.copyOf(producer.getOutputs()).inverse();
TupleTag<?> tag = outputs.get(value);
Preconditions.checkArgumentNotNull(tag, "PCollection %s not found in outputs of producer %s", value, producer);
ImmutableMap.Builder<TupleTag<?>, FieldAccessDescriptor> tagEntryBuilder = tagFieldAccess.build().get(entry.getKey());
if (tagEntryBuilder == null) {
tagEntryBuilder = ImmutableMap.builder();
tagFieldAccess.put(entry.getKey(), tagEntryBuilder);
}
tagEntryBuilder.put(tag, fieldAccess);
}
}
Aggregations