Java Code Examples for org.apache.flink.runtime.jobmanager.scheduler.SlotSharingGroup#addVertexToGroup()

The following examples show how to use org.apache.flink.runtime.jobmanager.scheduler.SlotSharingGroup#addVertexToGroup() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobVertex.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Associates this vertex with a slot sharing group for scheduling. Different vertices in the same
 * slot sharing group can run one subtask each in the same slot.
 * 
 * @param grp The slot sharing group to associate the vertex with.
 */
public void setSlotSharingGroup(SlotSharingGroup grp) {
	if (this.slotSharingGroup != null) {
		this.slotSharingGroup.removeVertexFromGroup(id);
	}

	this.slotSharingGroup = grp;
	if (grp != null) {
		grp.addVertexToGroup(id);
	}
}
 
Example 2
Source File: JobVertex.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Associates this vertex with a slot sharing group for scheduling. Different vertices in the same
 * slot sharing group can run one subtask each in the same slot.
 * 
 * @param grp The slot sharing group to associate the vertex with.
 */
public void setSlotSharingGroup(SlotSharingGroup grp) {
	if (this.slotSharingGroup != null) {
		this.slotSharingGroup.removeVertexFromGroup(id);
	}

	this.slotSharingGroup = grp;
	if (grp != null) {
		grp.addVertexToGroup(id);
	}
}
 
Example 3
Source File: JobVertex.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Associates this vertex with a slot sharing group for scheduling. Different vertices in the same
 * slot sharing group can run one subtask each in the same slot.
 *
 * @param grp The slot sharing group to associate the vertex with.
 */
public void setSlotSharingGroup(SlotSharingGroup grp) {
	if (this.slotSharingGroup != null) {
		this.slotSharingGroup.removeVertexFromGroup(this.getID(), this.getMinResources());
	}

	this.slotSharingGroup = grp;
	if (grp != null) {
		grp.addVertexToGroup(this.getID(), this.getMinResources());
	}
}