本文整理匯總了Java中org.apache.tez.dag.api.client.Progress類的典型用法代碼示例。如果您正苦於以下問題:Java Progress類的具體用法?Java Progress怎麽用?Java Progress使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Progress類屬於org.apache.tez.dag.api.client包,在下文中一共展示了Progress類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getVertexProgress
import org.apache.tez.dag.api.client.Progress; //導入依賴的package包/類
public Map<String, Float> getVertexProgress() {
Map<String, Float> vertexProgress = Maps.newHashMap();
for (Map.Entry<String, Progress> entry : dagStatus.getVertexProgress().entrySet()) {
Progress p = entry.getValue();
float progress = (float)p.getSucceededTaskCount() / (float)p.getTotalTaskCount();
vertexProgress.put(entry.getKey(), progress);
}
return vertexProgress;
}
示例2: getProgress
import org.apache.tez.dag.api.client.Progress; //導入依賴的package包/類
private float getProgress(String vertexName) {
Progress progress = dagStatus.getVertexProgress().get(vertexName);
if(progress == null) {
// no such stage. return 0 like MR app currently does.
return 0;
}
float totalTasks = (float) progress.getTotalTaskCount();
if(totalTasks != 0) {
return progress.getSucceededTaskCount()/totalTasks;
}
return 0;
}
示例3: monitorProgress
import org.apache.tez.dag.api.client.Progress; //導入依賴的package包/類
private double monitorProgress(Set<String> vertexNamess, double prevDagProgress,
Set<StatusGetOpts> opts, DAGStatus dagStatus) throws IOException, TezException {
Progress progress = dagStatus.getDAGProgress();
double dagProgress = 0.0;
if (progress != null && (dagProgress = getProgress(progress)) > prevDagProgress) {
printDAGStatus(vertexNamess, opts, dagStatus, progress);
}
return dagProgress;
}
示例4: getDAGProgress
import org.apache.tez.dag.api.client.Progress; //導入依賴的package包/類
public float getDAGProgress() {
Progress p = dagStatus.getDAGProgress();
return p == null ? 0 : (float)p.getSucceededTaskCount() / (float)p.getTotalTaskCount();
}
示例5: getProgress
import org.apache.tez.dag.api.client.Progress; //導入依賴的package包/類
private double getProgress(Progress progress) {
return (progress.getTotalTaskCount() == 0 ? 0.0 : (double) (progress.getSucceededTaskCount())
/ progress.getTotalTaskCount());
}