@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<OutputT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<KV<K, OutputT>> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<ElemT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<ElemT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<OutputT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<PubsubMessage> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public final Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, OutputT newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<T> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<ElemT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Override public Map<PValue, ReplacementOutput> mapOutputs( Map<TupleTag<?>, PValue> outputs, PCollection<ElemT> newOutput) { return ReplacementOutputs.singleton(outputs, newOutput); } }
@Test public void singletonSucceeds() { Map<PValue, ReplacementOutput> replacements = ReplacementOutputs.singleton(ints.expand(), replacementInts); assertThat(replacements, Matchers.hasKey(replacementInts)); ReplacementOutput replacement = replacements.get(replacementInts); Map.Entry<TupleTag<?>, PValue> taggedInts = Iterables.getOnlyElement(ints.expand().entrySet()); assertThat(replacement.getOriginal().getTag(), equalTo(taggedInts.getKey())); assertThat(replacement.getOriginal().getValue(), equalTo(taggedInts.getValue())); assertThat(replacement.getReplacement().getValue(), equalTo(replacementInts)); }
@Test public void singletonMultipleOriginalsThrows() { thrown.expect(IllegalArgumentException.class); ReplacementOutputs.singleton( ImmutableMap.<TupleTag<?>, PValue>builder() .putAll(ints.expand()) .putAll(moreInts.expand()) .build(), replacementInts); }