当前位置: 首页>>代码示例>>Java>>正文


Java ExecutionVertex.getCurrentAssignedResource方法代码示例

本文整理汇总了Java中org.apache.flink.runtime.executiongraph.ExecutionVertex.getCurrentAssignedResource方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionVertex.getCurrentAssignedResource方法的具体用法?Java ExecutionVertex.getCurrentAssignedResource怎么用?Java ExecutionVertex.getCurrentAssignedResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.flink.runtime.executiongraph.ExecutionVertex的用法示例。


在下文中一共展示了ExecutionVertex.getCurrentAssignedResource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getInstanceSummaryProfilingData

import org.apache.flink.runtime.executiongraph.ExecutionVertex; //导入方法依赖的package包/类
public InstanceSummaryProfilingEvent getInstanceSummaryProfilingData(long timestamp) {

		final Set<Instance> tempSet = new HashSet<Instance>();
		
		for (ExecutionVertex executionVertex : this.executionGraph.getAllExecutionVertices()) {
			AllocatedSlot slot = executionVertex.getCurrentAssignedResource();
			if (slot != null) {
				tempSet.add(slot.getInstance());
			}
		}

		// Now compare the size of the collected data set and the allocated instance set.
		// If their sizes are equal we can issue an instance summary.
		if (tempSet.size() != this.collectedInstanceProfilingData.size()) {
			return null;
		}

		return constructInstanceSummary(timestamp);
	}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:20,代码来源:JobProfilingData.java

示例2: addIfInstanceIsAllocatedByJob

import org.apache.flink.runtime.executiongraph.ExecutionVertex; //导入方法依赖的package包/类
public boolean addIfInstanceIsAllocatedByJob(InternalInstanceProfilingData instanceProfilingData) {

		for (ExecutionVertex executionVertex : this.executionGraph.getAllExecutionVertices()) {
			AllocatedSlot slot = executionVertex.getCurrentAssignedResource();
			if (slot != null && slot.getInstance().getInstanceConnectionInfo().equals(
					instanceProfilingData.getInstanceConnectionInfo()))
			{
				this.collectedInstanceProfilingData.put(instanceProfilingData.getInstanceConnectionInfo(), instanceProfilingData);
				return true;
			}
		}

		return false;
	}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:15,代码来源:JobProfilingData.java

示例3: toJson

import org.apache.flink.runtime.executiongraph.ExecutionVertex; //导入方法依赖的package包/类
public static String toJson(ExecutionVertex vertex) {
	StringBuilder json = new StringBuilder("");
	json.append("{");
	json.append("\"vertexid\": \"" + vertex.getCurrentExecutionAttempt().getAttemptId() + "\",");
	json.append("\"vertexname\": \"" + StringUtils.escapeHtml(vertex.getSimpleName()) + "\",");
	json.append("\"vertexstatus\": \"" + vertex.getExecutionState() + "\",");
	
	AllocatedSlot slot = vertex.getCurrentAssignedResource();
	String instanceName = slot == null ? "(null)" : slot.getInstance().getInstanceConnectionInfo().getFQDNHostname();
	
	json.append("\"vertexinstancename\": \"" + instanceName + "\"");
	json.append("}");
	return json.toString();
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:15,代码来源:JsonFactory.java


注:本文中的org.apache.flink.runtime.executiongraph.ExecutionVertex.getCurrentAssignedResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。