Search in sources :

Example 61 with EdgeProperty

use of org.apache.tez.dag.api.EdgeProperty in project tez by apache.

the class UnorderedPartitionedKVEdgeConfig method createDefaultEdgeProperty.

/**
 * This is a convenience method for the typical usage of this edge, and creates an instance of
 * {@link org.apache.tez.dag.api.EdgeProperty} which is likely to be used. </p>
 * If custom edge properties are required, the methods to get the relevant payloads should be
 * used. </p>
 * * In this case - DataMovementType.SCATTER_GATHER, EdgeProperty.DataSourceType.PERSISTED,
 * EdgeProperty.SchedulingType.SEQUENTIAL
 *
 * @return an {@link org.apache.tez.dag.api.EdgeProperty} instance
 */
public EdgeProperty createDefaultEdgeProperty() {
    EdgeProperty edgeProperty = EdgeProperty.create(EdgeProperty.DataMovementType.SCATTER_GATHER, EdgeProperty.DataSourceType.PERSISTED, EdgeProperty.SchedulingType.SEQUENTIAL, OutputDescriptor.create(getOutputClassName()).setUserPayload(getOutputPayload()), InputDescriptor.create(getInputClassName()).setUserPayload(getInputPayload()));
    Utils.setEdgePropertyHistoryText(this, edgeProperty);
    return edgeProperty;
}
Also used : EdgeProperty(org.apache.tez.dag.api.EdgeProperty)

Example 62 with EdgeProperty

use of org.apache.tez.dag.api.EdgeProperty in project tez by apache.

the class UnorderedPartitionedKVEdgeConfig method createDefaultCustomEdgeProperty.

/**
 * This is a convenience method for creating an Edge descriptor based on the specified
 * EdgeManagerDescriptor.
 *
 * @param edgeManagerDescriptor the custom edge specification
 * @return an {@link org.apache.tez.dag.api.EdgeProperty} instance
 */
public EdgeProperty createDefaultCustomEdgeProperty(EdgeManagerPluginDescriptor edgeManagerDescriptor) {
    Preconditions.checkNotNull(edgeManagerDescriptor, "EdgeManagerDescriptor cannot be null");
    EdgeProperty edgeProperty = EdgeProperty.create(edgeManagerDescriptor, EdgeProperty.DataSourceType.PERSISTED, EdgeProperty.SchedulingType.SEQUENTIAL, OutputDescriptor.create(getOutputClassName()).setUserPayload(getOutputPayload()), InputDescriptor.create(getInputClassName()).setUserPayload(getInputPayload()));
    Utils.setEdgePropertyHistoryText(this, edgeProperty);
    return edgeProperty;
}
Also used : EdgeProperty(org.apache.tez.dag.api.EdgeProperty)

Aggregations

EdgeProperty (org.apache.tez.dag.api.EdgeProperty)62 Test (org.junit.Test)31 HashMap (java.util.HashMap)28 ByteString (com.google.protobuf.ByteString)19 VertexStateUpdate (org.apache.tez.dag.api.event.VertexStateUpdate)19 EdgeManagerPluginDescriptor (org.apache.tez.dag.api.EdgeManagerPluginDescriptor)16 VertexManagerPluginContext (org.apache.tez.dag.api.VertexManagerPluginContext)15 VertexLocationHint (org.apache.tez.dag.api.VertexLocationHint)14 Configuration (org.apache.hadoop.conf.Configuration)13 Map (java.util.Map)9 EdgeManagerForTest (org.apache.tez.test.EdgeManagerForTest)7 TezConfiguration (org.apache.tez.dag.api.TezConfiguration)6 StateChangeNotifierForTest (org.apache.tez.dag.app.dag.TestStateChangeNotifier.StateChangeNotifierForTest)6 Vertex (org.apache.tez.dag.app.dag.Vertex)6 UserPayload (org.apache.tez.dag.api.UserPayload)5 TaskAttemptIdentifier (org.apache.tez.runtime.api.TaskAttemptIdentifier)5 GraceShuffleVertexManagerForTest (org.apache.tez.test.GraceShuffleVertexManagerForTest)5 VertexManagerPluginForTest (org.apache.tez.test.VertexManagerPluginForTest)5 TezUncheckedException (org.apache.tez.dag.api.TezUncheckedException)4 Vertex (org.apache.tez.dag.api.Vertex)4