use of com.hazelcast.sql.impl.schema.map.PartitionedMapTable in project hazelcast by hazelcast.
the class IMapSqlConnector method insertProcessor.
@Nonnull
@Override
public VertexWithInputConfig insertProcessor(@Nonnull DAG dag, @Nonnull Table table0) {
PartitionedMapTable table = (PartitionedMapTable) table0;
Vertex vertex = dag.newUniqueVertex(toString(table), new InsertProcessorSupplier(table.getMapName(), KvProjector.supplier(table.paths(), table.types(), (UpsertTargetDescriptor) table.getKeyJetMetadata(), (UpsertTargetDescriptor) table.getValueJetMetadata(), true))).localParallelism(1);
return new VertexWithInputConfig(vertex, edge -> edge.distributed().allToOne(newUnsecureUuidString()));
}
use of com.hazelcast.sql.impl.schema.map.PartitionedMapTable in project hazelcast by hazelcast.
the class IMapSqlConnector method sinkProcessor.
@Nonnull
@Override
public Vertex sinkProcessor(@Nonnull DAG dag, @Nonnull Table table0) {
PartitionedMapTable table = (PartitionedMapTable) table0;
Vertex vStart = dag.newUniqueVertex("Project(" + toString(table) + ")", KvProcessors.entryProjector(table.paths(), table.types(), (UpsertTargetDescriptor) table.getKeyJetMetadata(), (UpsertTargetDescriptor) table.getValueJetMetadata(), true));
Vertex vEnd = dag.newUniqueVertex(toString(table), writeMapP(table.getMapName()));
dag.edge(between(vStart, vEnd));
return vStart;
}
Aggregations