Search in sources :

Example 11 with InputProperty

use of org.apache.flink.table.planner.plan.nodes.exec.InputProperty in project flink by apache.

the class InputPropertySerdeTest method testExecEdgeSerde.

@Test
public void testExecEdgeSerde() throws IOException {
    ObjectMapper mapper = JsonSerdeUtil.getObjectMapper();
    StringWriter writer = new StringWriter(100);
    try (JsonGenerator gen = mapper.getFactory().createGenerator(writer)) {
        gen.writeObject(inputProperty);
    }
    String json = writer.toString();
    InputProperty actual = mapper.readValue(json, InputProperty.class);
    assertEquals(inputProperty, actual);
}
Also used : StringWriter(java.io.StringWriter) InputProperty(org.apache.flink.table.planner.plan.nodes.exec.InputProperty) JsonGenerator(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonGenerator) ObjectMapper(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Aggregations

InputProperty (org.apache.flink.table.planner.plan.nodes.exec.InputProperty)11 ExecEdge (org.apache.flink.table.planner.plan.nodes.exec.ExecEdge)8 ArrayList (java.util.ArrayList)6 ExecNode (org.apache.flink.table.planner.plan.nodes.exec.ExecNode)5 Transformation (org.apache.flink.api.dag.Transformation)3 TableException (org.apache.flink.table.api.TableException)3 RowData (org.apache.flink.table.data.RowData)3 PartitionTransformation (org.apache.flink.streaming.api.transformations.PartitionTransformation)2 HashDistribution (org.apache.flink.table.planner.plan.nodes.exec.InputProperty.HashDistribution)2 RequiredDistribution (org.apache.flink.table.planner.plan.nodes.exec.InputProperty.RequiredDistribution)2 BatchExecExchange (org.apache.flink.table.planner.plan.nodes.exec.batch.BatchExecExchange)2 AbstractExecNodeExactlyOnceVisitor (org.apache.flink.table.planner.plan.nodes.exec.visitor.AbstractExecNodeExactlyOnceVisitor)2 InternalTypeInfo (org.apache.flink.table.runtime.typeutils.InternalTypeInfo)2 StringWriter (java.io.StringWriter)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 Pair (org.apache.commons.lang3.tuple.Pair)1 VisibleForTesting (org.apache.flink.annotation.VisibleForTesting)1 Tuple3 (org.apache.flink.api.java.tuple.Tuple3)1