@Override public Boolean call(Tuple2<TupleTag<V>, WindowedValue<?>> input) { return tag.equals(input._1()); } }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof BigQueryConverters.FailsafeJsonToTableRow) { BigQueryConverters.FailsafeJsonToTableRow<?> that = (BigQueryConverters.FailsafeJsonToTableRow<?>) o; return (this.successTag.equals(that.successTag())) && (this.failureTag.equals(that.failureTag())); } return false; }
@Override public boolean equals(Object other) { if (!(other instanceof PCollectionView)) { return false; } @SuppressWarnings("unchecked") PCollectionView<?> otherView = (PCollectionView<?>) other; return tag.equals(otherView.getTagInternal()); }
@Override public boolean equals(Object other) { if (!(other instanceof PCollectionView)) { return false; } @SuppressWarnings("unchecked") PCollectionView<?> otherView = (PCollectionView<?>) other; return tag.equals(otherView.getTagInternal()); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DatastoreConverters.CheckSameKey) { DatastoreConverters.CheckSameKey that = (DatastoreConverters.CheckSameKey) o; return (this.goodTag.equals(that.goodTag())) && (this.errorTag.equals(that.errorTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DatastoreConverters.CheckNoKey) { DatastoreConverters.CheckNoKey that = (DatastoreConverters.CheckNoKey) o; return (this.successTag.equals(that.successTag())) && (this.failureTag.equals(that.failureTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DatastoreConverters.WriteJsonEntities) { DatastoreConverters.WriteJsonEntities that = (DatastoreConverters.WriteJsonEntities) o; return (this.projectId.equals(that.projectId())) && (this.errorTag.equals(that.errorTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ErrorConverters.LogErrors) { ErrorConverters.LogErrors that = (ErrorConverters.LogErrors) o; return (this.errorWritePath.equals(that.errorWritePath())) && (this.errorTag.equals(that.errorTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof DatastoreConverters.WriteEntities) { DatastoreConverters.WriteEntities that = (DatastoreConverters.WriteEntities) o; return (this.projectId.equals(that.projectId())) && (this.errorTag.equals(that.errorTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof BigQueryConverters.BigQueryToEntity) { BigQueryConverters.BigQueryToEntity that = (BigQueryConverters.BigQueryToEntity) o; return (this.query.equals(that.query())) && (this.entityKind.equals(that.entityKind())) && (this.uniqueNameColumn.equals(that.uniqueNameColumn())) && ((this.namespace == null) ? (that.namespace() == null) : this.namespace.equals(that.namespace())) && (this.successTag.equals(that.successTag())) && (this.failureTag.equals(that.failureTag())); } return false; }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof JavascriptTextTransformer.FailsafeJavascriptUdf) { JavascriptTextTransformer.FailsafeJavascriptUdf<?> that = (JavascriptTextTransformer.FailsafeJavascriptUdf<?>) o; return ((this.fileSystemPath == null) ? (that.fileSystemPath() == null) : this.fileSystemPath.equals(that.fileSystemPath())) && ((this.functionName == null) ? (that.functionName() == null) : this.functionName.equals(that.functionName())) && (this.successTag.equals(that.successTag())) && (this.failureTag.equals(that.failureTag())); } return false; }
@Override public <T> void output(final TupleTag<T> tag, final WindowedValue<T> output) { if (tag.equals(mainOutputTag)) { outputCollector.emit((WindowedValue<OutputT>) output); } else { outputCollector.emit(tag.getId(), output); } } }
private <T> void emit(TupleTag<T> tag, WindowedValue<T> value) { if (tag.equals(mainTag)) { // with tagged outputs we can't get around this because we don't // know our own output type... @SuppressWarnings("unchecked") WindowedValue<OutputT> castValue = (WindowedValue<OutputT>) value; output.collect(new StreamRecord<>(castValue)); } else { @SuppressWarnings("unchecked") OutputTag<WindowedValue<T>> outputTag = (OutputTag) tagsToOutputTags.get(tag); output.collect(outputTag, new StreamRecord<>(value)); } } }
private <T> void emit(TupleTag<T> tag, WindowedValue<T> value) { if (tag.equals(mainTag)) { // with tagged outputs we can't get around this because we don't // know our own output type... @SuppressWarnings("unchecked") WindowedValue<OutputT> castValue = (WindowedValue<OutputT>) value; output.collect(new StreamRecord<>(castValue)); } else { @SuppressWarnings("unchecked") OutputTag<WindowedValue<T>> outputTag = (OutputTag) tagsToOutputTags.get(tag); output.collect(outputTag, new StreamRecord<>(value)); } } }
private <T> void emit(TupleTag<T> tag, WindowedValue<T> value) { if (tag.equals(mainTag)) { // with tagged outputs we can't get around this because we don't // know our own output type... @SuppressWarnings("unchecked") WindowedValue<OutputT> castValue = (WindowedValue<OutputT>) value; output.collect(new StreamRecord<>(castValue)); } else { @SuppressWarnings("unchecked") OutputTag<WindowedValue<T>> outputTag = (OutputTag) tagsToOutputTags.get(tag); output.collect(outputTag, new StreamRecord<>(value)); } } }
/** * @param ctx provides translation context * @param beamNode the beam node to be translated * @param transform transform which can be obtained from {@code beamNode} */ @PrimitiveTransformTranslator(ParDo.MultiOutput.class) private static void parDoMultiOutputTranslator(final PipelineTranslationContext ctx, final TransformHierarchy.Node beamNode, final ParDo.MultiOutput<?, ?> transform) { final Map<Integer, PCollectionView<?>> sideInputMap = getSideInputMap(transform.getSideInputs()); final AbstractDoFnTransform doFnTransform = createDoFnTransform(ctx, beamNode, sideInputMap); final IRVertex vertex = new OperatorVertex(doFnTransform); ctx.addVertex(vertex); beamNode.getInputs().values().stream() .filter(input -> !transform.getAdditionalInputs().values().contains(input)) .forEach(input -> ctx.addEdgeTo(vertex, input)); ctx.addSideInputEdges(vertex, sideInputMap); beamNode.getOutputs().entrySet().stream() .filter(pValueWithTupleTag -> pValueWithTupleTag.getKey().equals(transform.getMainOutputTag())) .forEach(pValueWithTupleTag -> ctx.registerMainOutputFrom(beamNode, vertex, pValueWithTupleTag.getValue())); beamNode.getOutputs().entrySet().stream() .filter(pValueWithTupleTag -> !pValueWithTupleTag.getKey().equals(transform.getMainOutputTag())) .forEach(pValueWithTupleTag -> ctx.registerAdditionalOutputFrom(beamNode, vertex, pValueWithTupleTag.getValue(), pValueWithTupleTag.getKey())); }
output.getValue().getClass().getSimpleName()); PCollection<?> pc = (PCollection<?>) output.getValue(); if (output.getKey().equals(transform.getMainOutputTag())) { ports.put(pc, operator.output); } else { int portIndex = 0; for (TupleTag<?> tag : transform.getAdditionalOutputTags().getAll()) { if (tag.equals(output.getKey())) { ports.put(pc, operator.additionalOutputPorts[portIndex]); break;
output.getValue().getClass().getSimpleName()); PCollection<?> pc = (PCollection<?>) output.getValue(); if (output.getKey().equals(transform.getMainOutputTag())) { ports.put(pc, operator.output); } else { int portIndex = 0; for (TupleTag<?> tag : transform.getAdditionalOutputTags().getAll()) { if (tag.equals(output.getKey())) { ports.put(pc, operator.additionalOutputPorts[portIndex]); break;
if (!entry.getKey().equals(mainOutputTag)) { context.setOutputDataStream( entry.getValue(), outputStream.getSideOutput(tagsToOutputTags.get(entry.getKey())));
if (!entry.getKey().equals(mainOutputTag)) { context.setOutputDataStream(entry.getValue(), outputStream.getSideOutput(tagsToOutputTags.get(entry.getKey())));